-
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
gs1.1 direct connect #99
Conversation
I am ok on having this for now. But I would like to have us to generate the types declarations via js docs with aegir
You will need to have a signal server for the tests. Check it out this example:
This example allows us to test browser considering that a browser node will connect to it directly. I would recommend that we setup here this kind of server but with the server being a circuit relay. We would spin up n nodes, that would listen on the circuit relay peer for new connections from the other peers. Then, we can have configuration files for browser and node like here: https://github.com/libp2p/js-libp2p/tree/master/test/utils , but I would also have a function there to compute the listen multiaddrs to use. That is, we do not need to connect via the relay in node, just when running browser tests. |
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.
Maybe a new PR just adding libp2p as a parameter to have the tests good before getting this in?
ts/pubsub.js
Outdated
peerId, | ||
registrar, | ||
peerId: libp2p.peerId, | ||
registrar: libp2p.registrar, |
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.
When we refactor pubsub, I think we should also send libp2p to it. What do you think?
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.
for sure 👍
Yeah, I'll split this up into two PRs: first collecting interfaces and adding libp2p as a parameter, including passing tests, |
@wemeetagain thanks 👍 For the tests, you can get ideas from my WIP work for the rendezvous: It is working over circuit-relay for connecting the nodes |
Ok, awesome, I'll give it all a shot. Thanks for the examples, super helpful. |
f9af91d
to
7103b83
Compare
Codecov Report
@@ Coverage Diff @@
## gsv1.1 #99 +/- ##
=======================================
Coverage 91.66% 91.66%
=======================================
Files 2 2
Lines 24 24
=======================================
Hits 22 22
Misses 2 2 Continue to review full report at Codecov.
|
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!
Implements https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md#explicit-peering-agreements
Follows the go-libp2p-pubsub implementation closely