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: rendezvous protocol initial implementation #6
base: master
Are you sure you want to change the base?
feat: rendezvous protocol initial implementation #6
Conversation
|
@jacobheun this should be ready for an initial review on the structure, API and rpc parts. I also left a few questions that would like to discuss ( @vyzo would like your feedback on them as well) |
251a7e5
to
f2fc803
Compare
Added some initial comments.
One thing I think would be valuable here is to write a separate readme on how this will work with js-libp2p, as I think that will help flush out the API here a bit better. Assume we have a single rendezvous server, a relay, and a few nodes who want to find one another on a certain namespace. libp2p should start by connecting to the rendezvous server and ask for nodes in the relay space (if they aren't dialable) so that they can add that as a listener. The nodes should also query for peers they want to connect to on the same namespace. Once a node as a dialable address (relay or otherwise), it should register on its target namespace.
We should consider what the responsibilities are internally for libp2p and what they are for the application.
- Who is responsible for querying in the first place? Does libp2p handle this, or does the application need to account for it?
- After a query is made, who is responsible for determining if we need more records? (cookie reuse)
- Who is responsible for unregistering? Does libp2p do this on shutdown?
I think the use cases may vary quite a bit so it's reasonable for application logic to handle a lot of this, but clarifying that in usage guides and showcasing how to do those things is valuable and will make sure we've provided the support to do that.
b23fc7a
to
b2156be
Compare
4ca76ec
to
60713c0
Compare
60713c0
to
b8bf044
Compare
9913bc8
to
b080670
Compare
6e58f5b
to
ebb22d1
Compare
5931f0e
to
9765a95
Compare
ab46cf0
to
3ab6b6c
Compare
b5dac88
to
28541c7
Compare
28541c7
to
7e3c541
Compare
be5778f
to
4fae672
Compare
4fae672
to
83cd4b7
Compare
b9fda1e
to
9bf5bcb
Compare
dd3ce31
to
264ce2a
Compare
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest] |
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.
Github actions does not support running services (mysql) when running tests on other OS... We can move into travis, but I feel we can just run it in ubuntu as I don't expect people will run a Rendezvous server in Windows/MacOS
| - run: yarn | ||
| - run: npx nyc --reporter=lcov aegir test -t node -- --bail | ||
| - uses: codecov/codecov-action@v1 | ||
| test-chrome: |
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 kept the memory datastore previously implemented in the repo. It might be useful for small tests without spinning up MySQL, as well as to run the tests in the browser.
The browser tests are not useful as no one should run this in the browser, and I can remove them.
For example, for testing the libp2p client in libp2p core, it is easier to use the memory datastore, in order to not have to spin a MySQL db for running the tests
src/constants.js
Outdated
| @@ -0,0 +1,5 @@ | |||
| 'use strict' | |||
|
|
|||
| exports.PROTOCOL_MULTICODEC = '/rendezvous/1.0.0' | |||
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.
c883455
to
54c0948
Compare
54c0948
to
01ec7bc
Compare
212d754
to
5f025d3
Compare
8baf618
to
2840251
Compare
|
How likely is this to be merged any time soon? Looking really good! |
Thanks for reaching out. Apologies for the lack of visibility on the state of this. This is currently blocked on a couple of things:
It will likely not happen in the near future, unless we have more specific requirements from the community that push this work. The priority for this is being tracked in this project PR: protocol/web3-dev-team#67 |
|
As a status update on the Rendezvous Protocol, there is a new breaking change to the protocol that needs to be accounted for this PR libp2p/specs#338 |
This PR adds the rendezvous protocol server implementation using the latest
js-libp2p.Spec: https://github.com/libp2p/specs/tree/master/rendezvous
This PR contains the server implementations, as well as some hardening and performance considerations. Take into account that this was a full rewrite of the module, so you do not need to have into account the older code.
Github actions CI only allows services to operate in linux. Other environments are not being used