-
Notifications
You must be signed in to change notification settings - Fork 231
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
Peer dialing/kicking system overhaul #3346
Merged
Merged
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2b5354a
Extract easy stuff from #3346
Menduist 9504e4b
Force dial + excess peer trimmer
Menduist 31239b5
Merge remote-tracking branch 'origin/unstable' into tunepeering
Menduist 94f0cff
Merge remote-tracking branch 'origin/unstable' into tunepeering
Menduist 2e7ed23
Update gossip scoring
Menduist 1174ed0
Ensure we always have outgoing peers
Menduist 32fdd8c
Fix test
Menduist 5c7f394
Merge remote-tracking branch 'origin/unstable' into tunepeering
Menduist a036932
New trim loop
Menduist 170fd53
Bump libp2p & kick one peer at a time
Menduist 4f23049
Bump libp2p
Menduist ae57dbc
Merge branch 'bumplibp2p' into tunepeering
Menduist 058d08f
Add configurable hard-max-peers
Menduist 2d3ebcb
Peer trimmer grace period safeguard
Menduist a6b4877
Re-introduce kicking in discovery
Menduist cc4c49e
Update beacon_chain/networking/eth2_network.nim
Menduist 8341516
Merge remote-tracking branch 'origin/unstable' into tunepeering
Menduist 97a5977
Merge branch 'tunepeering' of github.com:status-im/nimbus-eth2 into t…
Menduist 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
Submodule nim-libp2p
updated
from dffe4b to cba3ca
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.
why do we skip non-stability peers here?
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.
ok, I read the code wrong - we're looking at peers that nimbus knows about, and filtering out peers that are in gossipsub and not in nimbus - if this happens, it smells of bug, but moving on:
we don't give score to syncnet peers in the initial loop - this needs addressing as well - also, we sort of prefer "large" peers with lots of subnets over smaller peer with fewer subnets - I suspect this ends up being wrong over time because it gives an unfair advantage to large peers which in now way are guaranteed to be "better" - it would be good to strive for a random mix of both kinds - perhaps "has_some_interesting_attnet" and "has_some_interesting_syncnet" would be better conditions?
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.
Another idea I had, instead of scoring on SUM(topicsPoints), we could score on MAX(topicPoints), wdyt?
The first loop is only here to score peers during sync at this point, ideally I would like to get rid of it, not sure how atm
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.
It can happen if we don't have a metadata for them yet (ie, they are in their grace period)
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.
Last commit switches to AVG(nonGlobalTopicsPoints)
Global topics are not counted because that would be unfair towards small nodes. They always have low value, and would bring the average down