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

DHT should not depend on boxo #846

Open Wondertan opened 1 year ago

Wondertan commented 1 year ago

Even though boxo/ipfs is the primary user of DHT, it does not mean that DHT should depend on it. It's used only for utility functions and the ipns validator. This basic usage does not justify importing the full-blown boxo for the tradeoff of conceptual cyclicity and go.mod bloat.

Wondertan commented 1 year ago

Also, my motivation here comes from seeing the recent versions and the nice improvements to DHT they bring, but the failure to update the project due to DHT's dependence on boxo. It requires fully migrating to it, which is PITA, especially because of https://github.com/ipfs/boxo/pull/281.

p-shahi commented 1 year ago

cc @Jorropo @guillaumemichel

guillaumemichel commented 1 year ago

@Wondertan agreed that kad-dht shouldn't depend on boxo. The (longer term) goal is to split the DHT implementation (currently go-libp2p-kad-dht), in 2 different repos. One generic dht implementation living in the libp2p org, and the IPFS instantiation of the DHT living in the ipfs org (maybe even within boxo). There is an ongoing effort for a larger refactor and split of the repo, but no ETA yet.

Wondertan commented 1 year ago

Do you mean ComposableDHT?

guillaumemichel commented 1 year ago

It should be the case with the ComposableDHT, but we already want to split the repo before during a repo refactor.