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

modified the `DefaultPrefix`, couldn't discover any nodes #874

Closed andy-hsiung closed 1 year ago

andy-hsiung commented 1 year ago

I forked this project and modified the DefaultPrefix in dht_options.go, but after the modification, I couldn't discover any nodes. Can you help me resolve this issue?

guillaumemichel commented 1 year ago

The DefaultPrefix is part of the protocol.ID, and you will only be able to discover nodes running the same protocol.ID as your node. Hence, if they are no other nodes running the same protocol.ID you will be unable to discover any nodes. You should either use the IPFS protocol.ID to connect to the IPFS network (or any other live networks) or create your own protocol.ID, but you need to provide your own nodes.

Please address any follow up to this question on the libp2p forum or the IPFS forum.