Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Add Example of private network / DHT configuration #156

Open
willscott opened this issue Apr 21, 2020 · 2 comments
Open

Add Example of private network / DHT configuration #156

willscott opened this issue Apr 21, 2020 · 2 comments
Assignees

Comments

@willscott
Copy link

The current host example doesn't default to becoming a self-sustaining DHT mesh. It would be useful to add an example using the Dual DHT from go-libp2p-kad-dht to demonstrate that configuration.

@alabianca
Copy link

I ran into the issue of DHT Get Value not working because nodes aren't found a few days ago when playing around with some of the examples. I created a new example that uses the dht.PutValue and dht.GetValue to put and retrieve values from the dht. It worked fine in the examples repo, but not outside of it.
The reason why it worked in the examples is that it uses go-libp2p-kad-dht version 0.5.0. My example outside of the repo uses version 0.7.10 which always returned an error when trying to dht.GetValue or dht.PutValue.

I replaced the dht.New(ctx, host) with dual.New(ctx, host) from github.com/libp2p/go-libp2p-kad-dht/dual and it worked. I am still trying to wrap my head around why it worked exactly

@xiaokugua250
Copy link

xiaokugua250 commented May 26, 2020

+1
and @alabianca will you show your code example please ! thanks a lot

@aarshkshah1992 aarshkshah1992 self-assigned this Jan 22, 2021
This was referenced Jan 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants