-
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: waku rendezvous wrapper #2962
base: master
Are you sure you want to change the base?
Conversation
You can find the image built from this PR at
Built from 8228856 |
|
d5247ba
to
3e651ee
Compare
bffa68b
to
6014283
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.
Thanks ! LGTM
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, thanks so much! 🤩
We should probably add tests though, to make sure that the procs defined in protocol.nim
work as expected
./common | ||
|
||
logScope: | ||
topics = "waku rendez vous" |
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.
topics = "waku rendez vous" | |
topics = "waku rendezvous" |
I would personally write "rendezvous" everywhere instead of "rendez vous" for consistency (it will also make everything easier when performing searches)
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.
Yes, sorry for that in French it's 2 words not one...
continue | ||
|
||
# Ask for 12 peer records for that shard | ||
self.request(namespace, 12, @[rpi.peerId]) |
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.
wouldn't be better to have a constant instead of hardcoding 12?
# start registering forever | ||
self.periodicRegistrationFut = self.periodicRegistration() | ||
|
||
proc stopWait*(self: WakuRendezVous) {.async: (raises: []).} = |
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 think we're not calling stopWait()
anywhere. Shouldn't we add it to a stop()
proc so it gets executed when calling node.wakuRendezvous.stop()
?
I will add some tests but nim-libp2p already tests the functionalities. |
Description
I've wrapped libp2p rendezvous protocol so that at the waku layer we can register at rdv points and also request peer records.
spec -> https://github.com/waku-org/specs/blob/master/standards/core/rendezvous.md
Changes