go-libp2p-kad-dht icon indicating copy to clipboard operation
go-libp2p-kad-dht copied to clipboard

Don't add peers to routing table unless they have a routable IP address

Open Stebalien opened this issue 6 years ago • 5 comments

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:

  1. Periodically walk our peer list in the background, checking for all peers that (a) support the DHT protocol and (b) have a public address.
  2. 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.

Stebalien avatar May 03 '19 00:05 Stebalien

~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.

Stebalien avatar May 03 '19 00:05 Stebalien

I think that's a reasonable thing to do.

vyzo avatar May 03 '19 07:05 vyzo

Is there any timeline on when this can be addressed?

prestonvanloon avatar May 24 '19 16:05 prestonvanloon

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.

Stebalien avatar May 24 '19 16:05 Stebalien

Thanks, subscribed to that.

prestonvanloon avatar May 24 '19 21:05 prestonvanloon