Open viraptor opened 3 years ago
This behaviour has not changed.
Without additional configuration, a peer cannot know if it should expect other peers to be reachable on the local network. Even if seen_addrs
suggests that the remote is reachable at a public address, it could still be located in the local network (and the seen_addrs
actually not routable due to hairpinning behaviour, resp. lack thereof).
The setting you introduced in #597 can be used to prevent a peer from advertising private addresses. We could say that, if Endpoint::listen_addrs
does not contain any address for which IpAddr::is_global
returns false
, connection attempts are failed-fast.
The private network addresses, sure - they're useful.
But do you want to advertise the 127.0.0.1
as well? Are there scenarios outside of explicit local testing where loopback would be a valid option?
explicit local testing
Probably not, but then we need a config option --enable-loopback
=]
With the recent seed (bins commit 7780f036198a04a16d00ad706042501466f022e7) I'm seeing a lot of address advertisements for localhost which are then attempted. For example:
These should be either not sent or not attempted (maybe unless seed is in some explicit debug mode?) since it won't be able to other nodes over loopback.