Problem
Bootnodes and peer-book entries often advertise non-routable endpoints (loopback, private, link-local: 127.0.0.1, 10.x, 192.168.x, 172.16-31.x,fe80::, fc00::/7). These are unreachable from a remote light client, so smoldot wastes connection slots dialing addresses that can only fail.
#3273 made warm start more reliable by preferring bootnodes over the stale peer book until the first gossip link. But that doesn't help when the bootnode's own addresses are private/link-local - the dial still fails.
Proposal
- Prefer routable endpoints over non-routable ones when assigning slots.
- Follow litep2p's approach: deprioritize, don't drop. litep2p scores addresses and gives a bonus to global ones, so private addresses stay usable as fallback. See
is_global_multiaddr.
- Deprioritizing (not dropping) keeps zombienet native-provider tests working, where nodes run locally and local endpoints are the only way to connect.
Problem
Bootnodes and peer-book entries often advertise non-routable endpoints (loopback, private, link-local:
127.0.0.1,10.x,192.168.x,172.16-31.x,fe80::,fc00::/7). These are unreachable from a remote light client, so smoldot wastes connection slots dialing addresses that can only fail.#3273 made warm start more reliable by preferring bootnodes over the stale peer book until the first gossip link. But that doesn't help when the bootnode's own addresses are private/link-local - the dial still fails.
Proposal
is_global_multiaddr.