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

DHT Discovery #27

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

DHT Discovery #27

wants to merge 17 commits into from

Conversation

bltavares
Copy link
Owner

@bltavares bltavares commented Feb 5, 2021

Use https://github.com/mattsse/hyperswarm-dht to find peers and exchange data over hyperswarm DHT.

TODO:

  • Create DHTDiscovery that implements a stream of sockets
  • Create Locator that finds new peers
  • Create Announcer that announces it's feeds
  • Integrate with hyperstack
  • Figure out why lookup is returning empty and bootstrap takes so long to finish - State of Announce interop mattsse/hyperswarm-dht#5
  • Fix TODOs related to DHT config/port/timeout
  • Fix clippy/warnings

Closes #17

@bltavares bltavares added the help wanted Extra attention is needed label May 9, 2021
@bltavares
Copy link
Owner Author

If we can troubleshoot why mattsse/hyperswarm-dht#5 keeps returning peers = [] we can move forward with DHT support.

I'm not sure why it's happening - the DHT flow has not been easy to troubleshoot for me as I don't know much about the kademlia protocol.

@bltavares bltavares removed the help wanted Extra attention is needed label May 13, 2021
@bltavares
Copy link
Owner Author

Local tests with some patches on upstream dht implementation had progress!

May 13 01:25:49.992  INFO colmeia_hyperswarm_dht: Starting up
May 13 01:25:50.016  INFO colmeia_hyperswarm_dht: Adding topic
[colmeia-hyperswarm-dht\src\announcer.rs:100] self.swarm.write().await.announce(query) = QueryId(
    1,
)
May 13 01:25:50.020  INFO colmeia_hyperswarm_dht: Finding topic
May 13 01:26:50.596  INFO colmeia_hyperswarm_dht: Found peer: Some(([177, 114, 215, 48, 75, 125, 249, 213, 57, 182, 124, 161, 0, 161, 147, 10, 225, 2, 17, 31, 194, 83, 207, 120, 78, 100, 146, 49, 149, 106, 155, 156], 189.46.211.63:3899))
May 13 01:26:50.597  INFO colmeia_hyperswarm_dht: Remove topic
May 13 01:26:50.598  INFO colmeia_hyperswarm_dht: Sleep

@bltavares bltavares marked this pull request as ready for review May 17, 2021 01:09
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 with hypwerswarm dht
1 participant