-
Notifications
You must be signed in to change notification settings - Fork 941
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
Discv5 interest? #1551
Comments
We've some DHT based discovery scheme already, no? How do they differ? At least for polkadot, we should replace SECIO and sep256k1 with TLS 1.3 or Noise, while this appear fairly wedded to them, but this is more about keeping people on the same code bas I guess. |
@burdges yes, Substrate and thereby Polkadot use random walks on a Kademlia Dht to discover new nodes.
Referencing the Why are we using discv5 and not libp2p Kademlia DHT? from the eth2.0 specification. |
It's a good question. All the protocols in the rust-libp2p repo right now operate within a "libp2p connection" (encrypted/multiplexed on top of a transport), except for libp2p-mdns, which belongs here because it's part of the libp2p specs. I'm thus inclined towards "no, it should be in another repo". (edit: I also don't have a strong opinion on this) |
Yeah that is correct, I remember reading the specification for discv5 and libp2p in eth2.0, and it seemed pretty janky due to that exact reason. |
Yes. Discv5 uses udp and my implementation behaves very similarly to libp2p-mdns, in the sense that it doesn't use any currently established transport or upgraded connection. I've built essentially wrappers around the protocol so that it interfaces with libp2p for my specific purposes (as @tomaka noticed in the behaviour). I think also that primary users of this may not be using libp2p and it probably makes more sense then to make it stand-alone. There is still the option to import it as a standalone crate and use similarly to mdns (with added libp2p wrappers) however I think this is not worth the effort if there are no other specific projects that require discv5 within libp2p. I'll close this and convert it to a stand-alone crate. Thanks for the comments :) |
I have a working version of discovery v5 in https://github.com/sigp/rust-libp2p/tree/discv5
It currently functions as a standalone protocol integrated with libp2p for our particular use case.
Discv5 is still a work in progress, so future versions still needs to be built.
To fit with rust-libp2p, it still needs to upgrade to stable futures and remove tokio in favour of async-std. I'm deciding whether to take this and merge it into our project and maintain it there. However there are some others interested in this, in which case it may be suited to this repo.
Is there any interest in adding the discv5 protocol to rust-libp2p? If so, I may do the work to make it suitable for rust-libp2p.
The text was updated successfully, but these errors were encountered: