-
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
fix: adding peer exchange peers to the peerStore #2824
fix: adding peer exchange peers to the peerStore #2824
Conversation
You can find the image built from this PR at
Built from b4d5906 |
You can find the image built from this PR at
Built from b4d5906 |
I tried to also take care of nwaku/waku/factory/node_factory.nim Line 133 in e41aa57
But noticed that in the handler we don't receive the exchanged peers ENRs so we can't filter by the cluster/shards. Maybe I'm missing something. In any case, I think that the Peer Manager itself should be in charge of the filtering peers by shards so we don't duplicate the logic. This should be taken care of when we activating sharded peer management. |
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 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.
Sounds reasonable to me. Thank you!!!
Description
As soon we receive peers in Peer Exchange, we currently try to connect to all of them directly in a very aggressive way.
This does not take into account our connection targets and limits. Therefore, we should first add the peers to the Peer Store, and the connectivity loop will be in charge to choose and connect to the amount of peers necessary to reach its targets.
Changes
Issue
We saw this case happen and potentially cause issues in #2780