-
Notifications
You must be signed in to change notification settings - Fork 47
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: update WakuPeerStore to store pubSubTopics for a peer #734
Conversation
Jenkins BuildsClick to see older builds (24)
|
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, however we'll probably need to add code in future PRs to maintain the peerstore, as peers might join/leave the pubsub topic. Looking at go-libp2p-pubsub code, I see there are some PeerJoin / PeerLeave events we can probably subscribe to, and this way determine whether a peer still is part of a pubsub topic or not
Right, that also needs to be handled. |
Description
Store pubSubTopics that a peer supports. This is done keeping static sharding in mind as per #727
For autosharding, this can be reused, whereas API updates would be requried to only accept contentTopics.
Will take up sharded peer-mgmt in a separate PR in order to avoid making this one too big :)
Changes
Tests
All unit tests have passed.
All builds have passed.
Note: Did not add new tests for these, as existing tests for discovery protocols seem to cover all flows.