libp2p / go-libp2p-kad-dht

A Kademlia DHT implementation on go-libp2p
https://github.com/libp2p/specs/tree/master/kad-dht
MIT License
524 stars 224 forks source link

Libp2p DHT #597

Open Stebalien opened 4 years ago

Stebalien commented 4 years ago

Currently, the DHT in this package is the "IPFS" DHT.

  1. It's called IpfsDHT.
  2. It's protocol starts with /ipfs.
  3. It requires the IPFS DHT validators.
  4. It defaults to a special "auto" mode where nodes won't join the DHT until they're publicly reachable.

These are all requirements for the IPFS DHT, but not requirements for DHTs in general. Worse, the IPFS DHT is actually a dual DHT at this point because dht.New will return a semi-broken DHT that will refuse to work on private/localhost networks.

For motivation, see: https://github.com/libp2p/go-libp2p-kad-dht/issues/569, https://github.com/libp2p/go-libp2p-kad-dht/issues/564, https://github.com/libp2p/go-libp2p-kad-dht/issues/561.

We should:

This way, users trying to build libp2p apps can explicitly choose which DHT they want to join and how they want to configure their network.

Stebalien commented 4 years ago

cc @raulk.

willscott commented 4 years ago