This repository was archived by the owner on Oct 28, 2021. It is now read-only.
Don't add official Ethereum bootnodes as required peers#5628
Merged
halfalicious merged 2 commits intomasterfrom Jun 15, 2019
Merged
Don't add official Ethereum bootnodes as required peers#5628halfalicious merged 2 commits intomasterfrom
halfalicious merged 2 commits intomasterfrom
Conversation
Add them to the node table rather than as required peers - this results in us interacting with them via discovery (which is where their real value lies) and if we can validate the endpoint proof, adding them as optional peers and trying to connect to them via devp2p. However, we stop trying to connect to them if we get disconnected for a critical reason (e.g. they're on a different network or we don't have any common capabilities). This makes more sense than adding them as required peers which results in us endlessly trying to connect to them via devp2p, regardless of the disconnect reason - note that many of them are on different Ethereum networks and also don't appear to be running devp2p so they don't support syncing.
Contributor
Author
|
We should wait until #5624 is merged to merge this (not strictly required but this work makes more sense after 5624 is in) |
Contributor
Author
|
Still need to test these changes and investigate the failing tests |
gumb0
approved these changes
Jun 14, 2019
Member
gumb0
left a comment
There was a problem hiding this comment.
This looks fine. Changes in aleth/main.cpp shouldn't affect any tests, so the failures are weird
Codecov Report
@@ Coverage Diff @@
## master #5628 +/- ##
=========================================
Coverage ? 62.63%
=========================================
Files ? 350
Lines ? 29697
Branches ? 3344
=========================================
Hits ? 18602
Misses ? 9889
Partials ? 1206 |
Member
|
This is good change, because the predefined bootnodes are to be only used to bootstrap the p2p. Then we should rather depend on other peers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add them to the node table rather than as required peers - this results in us interacting with them via discovery (which is where their real value lies) and if we can validate the endpoint proof, adding them as optional peers and trying to connect to them via devp2p. However, we stop trying to connect to them if we get disconnected for a critical reason (e.g. they're on a different network or we don't have any common capabilities). If we get disconnected for a non-critical reason (e.g. a TCP error), we'll try to reconnect at increasing intervals.
This makes more sense than adding them as required peers which results in us endlessly trying to connect to them via devp2p, regardless of the disconnect reason - note that many of them are on different Ethereum networks and also don't appear to be running devp2p so they don't support syncing, so we never end up being able to connect to them anyway. In practice, I believe we're only ever able to peer with 1 node out of our full list.