-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: running periodicaly peer exchange if discv5 is disabled #3150
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
449f32a
feat: running periodicaly peer exchange if discv5 is disabled
gabrielmer 705a353
adding while loop
gabrielmer 167df07
don't exit if first px request fails
gabrielmer 0fcda5d
saving px loop handle
gabrielmer 499f44c
added comment
gabrielmer 165a566
using while true for consistency
gabrielmer 32cf0e0
considering case of node not started in keepalive loop
gabrielmer a8578d5
changing warning message
gabrielmer 9ba76d0
fixing test
gabrielmer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If have no discv5 but want to use PX, how can we ensure to get some initial PX service peer?
Isn't it
conf.peerExchangeNode
setting ensure it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it even without setting
peerExchangeNode
and worked :))If there isn't a
peerExchangeNode
set, then any peer we have in the store with the PX codec is chosen randomly, so we just need to be connected to at least one peer that supports PXnwaku/waku/node/peer_manager/peer_manager.nim
Lines 243 to 254 in b3656d6
It can be any of our normal bootstrap nodes or a static node also.
Then, the peers we receive via PX if they also support it will enter to the pool from which we choose randomly, so it's just a matter of having a point where to start from, and luckily it must not necessarily be a configured
peerExchangeNode
:)