pex: dial seeds when address book needs more addresses#3603
Merged
melekes merged 2 commits intotendermint:developfrom Apr 30, 2019
Polychain:fix-stalled-peer-discovery
Merged
pex: dial seeds when address book needs more addresses#3603melekes merged 2 commits intotendermint:developfrom Polychain:fix-stalled-peer-discovery
melekes merged 2 commits intotendermint:developfrom
Polychain:fix-stalled-peer-discovery
Conversation
If we are low on addresses for peering, we need to discover more peers. The previous behavior would query existing peers; however, if an existing peer does not participate in peer exchange, then our node will not discover more peers. This change consults both existing peers as well as seeds when there is a deficit in address book addresses. This allows for discovering peers though existing channels as well as via seeds if existing peers do not share addresses.
Contributor
Author
|
I'd like to settle on direction for the code changes before tackling the remaining TODO items from the PR checklist. |
Codecov Report
@@ Coverage Diff @@
## master #3603 +/- ##
=========================================
Coverage ? 64.15%
=========================================
Files ? 213
Lines ? 17380
Branches ? 0
=========================================
Hits ? 11150
Misses ? 5303
Partials ? 927
|
Contributor
|
This looks like a great change! |
Contributor
|
Thanks for contributing to Tendermint 👍 |
melekes
added a commit
that referenced
this pull request
May 1, 2019
* p2p: merge switch cases also improve the error msg in privval * pex: refactor code plus update specification follow-up to #3603 * Update docs/spec/reactors/pex/pex.md Co-Authored-By: melekes <anton.kalyaev@gmail.com>
brapse
pushed a commit
to brapse/tendermint
that referenced
this pull request
Jun 5, 2019
If we are low on addresses for peering, we need to discover more peers. The previous behavior would query existing peers; however, if an existing peer does not participate in peer exchange, then our node will not discover more peers. This change consults both existing peers as well as seeds when there is a deficit in address book addresses. This allows for discovering peers though existing channels as well as via seeds if existing peers do not share addresses.
brapse
pushed a commit
to brapse/tendermint
that referenced
this pull request
Jun 5, 2019
* p2p: merge switch cases also improve the error msg in privval * pex: refactor code plus update specification follow-up to tendermint#3603 * Update docs/spec/reactors/pex/pex.md Co-Authored-By: melekes <anton.kalyaev@gmail.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
If we are low on addresses for peering, we need to discover more peers. The
previous behavior would query existing peers; however, if an existing peer
does not participate in peer exchange, then our node will not discover more peers.
This change consults both existing peers as well as seeds when there is a deficit
in address book addresses. This allows for discovering peers though existing channels
as well as via seeds if existing peers do not share addresses.