-
Notifications
You must be signed in to change notification settings - Fork 265
fix: don't limit peer exchange to dns-discovered peers #6941
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
Merged
Merged
Changes from all commits
Commits
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 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
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.
wondering if we can keep this logic of adding peers discovered via DNS to peerStore and connect to them.
This would provide better/more peers to choose from.
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.
@chaitanyaprem, wouldn't we have DNS-discovered peers already in the
peerStore? Or we're not always connecting to them, only use for discovery?So you want like no matter if we are connected to them or not, we should keep the peer exchange running with them?
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.
Since they were being connected to here, was not sure if they are being added to peerStore somewhere else. If they are being added to peerStore then this can be removed.
This would be better imo as they would be bootnodes the chance of getting high quality peers is high.
Uh oh!
There was an error while loading. Please reload this page.
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.
ah, indeed. I was sure they we were connecting to them elsewhere, but couldn't find it now.
Thank you, @chaitanyaprem, I will make sure we still connect to them 👍
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.
Apparently we do connect to the DNS-discovered nodes, here:
status-go/messaging/waku/gowaku.go
Lines 536 to 543 in cbbbec4
status-go/messaging/waku/gowaku.go
Lines 563 to 567 in cbbbec4
And we duplicate the
enrtree://in the fleet configuration, for both static connection and Discv5 connection:status-go/params/cluster.go
Lines 79 to 85 in f176cba
So. All should be good. We have the fleet
enrtree://and always connect to all retrieved nodes. So they will not only appear indnsAddressCache, but also in the peer cache itself. So we will always run peer exchange with them.