ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
15.81k stars 2.96k forks source link

chore: upgrade go-libp2p-kad-dht #10378

Closed hacdias closed 1 month ago

hacdias commented 1 month ago

Supersedes and closes #10100.

[..] go-libp2p-kad-dht v0.25.0 introduced a change (https://github.com/libp2p/go-libp2p-kad-dht/pull/839) to prevent private addresses to land on the public Amino DHT, so some tests may need to be modified.

My solution by using an environment variable to disable the address filtering in the DHT is definitely not the best. But something along this lines seems to be necessary for testing since we don't have multiple public IPs available. My other solution would be to add some test flag to Kubo (or config).

hacdias commented 1 month ago

@guillaumemichel I can certainly add an option (it would be better than an environment variable). I think it's just important to understand whether or not it would be useful.

The only case I can think of for the LAN DHT is if someone is running multiple Kubo nodes on the same machine.

Disabling the private addresses in the WAN DHT can be useful for private networks maybe. Now that I think of it: if we don't add this option, aren't we literally breaking private IPFS clusters within private networks with no public IPs?

guillaumemichel commented 1 month ago

Yes, it would essentially be useful for local ipfs clusters I guess (see https://github.com/libp2p/go-libp2p-kad-dht/pull/839#issuecomment-1673681230)

hacdias commented 1 month ago

@guillaumemichel ok, then I will rework this to be an option in the Kubo configuration instead.