go-libp2p-kad-dht
go-libp2p-kad-dht copied to clipboard
Don't add peers to routing table unless they have a routable IP address
This is a mirror of #216. The only tricky part is that they may learn about their external address later and push it with identify push and we have no events system to catch this change.
Instead of adding peers to the routing table as we get connections, we may want to:
- Periodically walk our peer list in the background, checking for all peers that (a) support the DHT protocol and (b) have a public address.
- Eagerly walk the peer list if we try to find peers in the routing table but find an empty routing table.
cc @vyzo, I think this could drastically improve the DHT as a lot of peers aren't even reporting public addresses.
~Hm. I still think we should do this but it looks like all the peers not reporting public addresses are also not acting as DHT servers (as far as I can tell).~
Nevermind. They're running as DHT servers.
I think that's a reasonable thing to do.
Is there any timeline on when this can be addressed?
This isn't on anyone's plate at the moment.
Note: I think the issue you're looking for is https://github.com/libp2p/go-libp2p/issues/436.
Thanks, subscribed to that.