Skip to content
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: add Kademlia to rust peer #17

Merged
merged 1 commit into from
Apr 4, 2023
Merged

feat: add Kademlia to rust peer #17

merged 1 commit into from
Apr 4, 2023

Conversation

p-shahi
Copy link
Member

@p-shahi p-shahi commented Apr 4, 2023

closes #16 by reintroducing Kademlia (which was deleted as a part of 074b376)

@vercel
Copy link

vercel bot commented Apr 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
universal-connectivity ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2023 1:10am

@mxinden
Copy link
Member

mxinden commented Apr 5, 2023

Note that adding the Kademlia NetworkBehaviour in itself is not quite enough. You would (a) need to execute the bootstrap method regularly and (b) actively add peers (like you do, commented out, for the bootstrap nodes).

You can find an example here:

(a) https://github.com/mxinden/rust-libp2p-server/blob/4d887c720bf25ad282c58d8f7d9773715a2b5c70/src/main.rs#L162-L169

(b) https://github.com/mxinden/rust-libp2p-server/blob/4d887c720bf25ad282c58d8f7d9773715a2b5c70/src/main.rs#L172-L199

The latter will be automated once we have libp2p/rust-libp2p#2680.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate Kademlia on rust server for improved peer discovery
2 participants