-
Notifications
You must be signed in to change notification settings - Fork 54
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 manager #2151
Conversation
You can find the image built from this PR at
Built from ec08762 |
3b6a1bc
to
36866cd
Compare
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.
LGTM, thank you!
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! left some comments
I'm still looking at the tests. Some are easier to update than others. |
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.
lgtm! Thanks for the changes.
Since it involves some networking changes, sometimes difficult to unit test, I would verify with waku-simulator (or related setup) that connectivity is working fine.
Yes I won't be merging this without some simulations. These changes could have unforeseen consequences. |
eb0f52b
to
2947dab
Compare
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.
Great job. Approving as not to be a blocker, though I think the current targets per shard may quickly cause issues if underlying max-connections for the libp2p switch does not account for the total number of connections. Comment re this below.
b79983c
to
bc20db5
Compare
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'm late to this PR. Just added a comment aiming to bring more debug detail. No blocking
256ecd9
to
bfc4e13
Compare
bfc4e13
to
d464309
Compare
In order to unblock this work I've opened #2237 |
de36146
to
7580a6a
Compare
Fix possible out of bound & logic error Filter peers per protocol & rename proc Fix out of bound & refactor dialling Fix catching raise VS timeout & tests fixes Fix test to connect to all peer per proto Fix test Div target per shard count Logging & stuff Fixes Log peer count More logs Remove protobook override & clean up Fix relay peer management & logs Mics Fixes Fixes
7d0f2f7
to
1cf3a80
Compare
I've done simulations and this should be the final version of this feature. Sorry for the re-review but it's critical to get this right. |
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.
great work on this thanks! lgtm!
one important comment though regarding modificating the ProtoBook
table, which is already modified by identify.
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.
LGTM!
This reverts commit dba9820. We need to revert this commit because the waku-simulator stopped working. i.e. the nodes couldn't establish connections among them: https://github.com/waku-org/waku-simulator/tree/054ba9e33f4fdcdb590bcfe760a5254069c5cb9f Also, the following js-waku test fails due to this commit: "same cluster, different shard: nodes connect"
This reverts commit dba9820. We need to revert this commit because the waku-simulator stopped working. i.e. the nodes couldn't establish connections among them: https://github.com/waku-org/waku-simulator/tree/054ba9e33f4fdcdb590bcfe760a5254069c5cb9f Also, the following js-waku test fails due to this commit: "same cluster, different shard: nodes connect" * waku_lightpush/protocol.nim: minor changes to make it compile after revert
This reverts commit dba9820. We need to revert this commit because the waku-simulator stopped working. i.e. the nodes couldn't establish connections among them: https://github.com/waku-org/waku-simulator/tree/054ba9e33f4fdcdb590bcfe760a5254069c5cb9f Also, the following js-waku test fails due to this commit: "same cluster, different shard: nodes connect" * waku_lightpush/protocol.nim: minor changes to make it compile after revert
Description
Peer manager must track peers per shard. Each with a target number of in/out peers and then connect/prune connections accordingly.
Changes
Tracking #1940