-
Notifications
You must be signed in to change notification settings - Fork 57
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: sharded peer management Round 2 #2332
Conversation
bff6f97
to
fee20c7
Compare
You can find the image built from this PR at
Built from 4b98690 |
2e2613a
to
0b3a534
Compare
Adding randomized peer selection speed-up reaching steady-state relay connections when using waku-simulator. |
I will gate the new feature behind a flag so that we can test this if needed. |
Fix ip colocation limit Added randomized peer selection
0b3a534
to
91a2636
Compare
This PR may contain changes to configuration options of one of the apps. If you are introducing a breaking change (i.e. the set of options in latest release would no longer be applicable) make sure the original option is preserved with a deprecation note for 2 following releases before it is actually removed. Please also make sure the label |
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.
Looks amazing! Thank you! Added a couple questions :))
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.
Thanks so much! 🔥
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.
Thanks. Lgtm in terms of introducing the same functionality as before but now hidden behind a feature flag. Two thoughts:
- could we target this for testing in deployed waku-simulator network and
waku.test
. I think the testing here is important enough to warrant creating a new issue just to track this, given that peer management is so fundamental - although named shards should be deprecated, is there a way to reconcile the two peer management paradigms even before named shards disappear? For example, it seems possible to consider a uint32 hash of named shards as the unique index representation of that shard.
It was tested with waku-simulator but I agree that deploying to a fleet is a good idea.
I never though of that but yes it could work. I'll look into it. edit: The only way it would make sense to me would be if the default pubsub topic was given a shard number but then it breaks backward compatibility and conflict with static shard namespace. Seams a lot of work for not much benefit. |
Description
Peer manager must track peers per shard. Each with a target number of in/out peers and then connect/prune connections accordingly.
This new feature is behind a config flag
N.B.
The first version was reverted because of backward-compatibility problems. Named sharding is deprecated but not unsupported.
Changes
Tracking #1940