-
Notifications
You must be signed in to change notification settings - Fork 18
Description
When an incoming peer connects from behind NAT or other firewall, they can only be incoming, and in this scenario it is common for that peer to provide no routable IP address unless it was specified with p2p.external_ip
.
For example, from the office or at home, you sync a node on your laptop to the public network. It is extremely likely that you are in a LAN and your local machine is not directly on the internet, just behind a NAT'd firewall. When this is the case, the node to which you connect has no usable address for you, yet you are connected.
We need to look again at how a node should handle such incoming peers:
- does it properly handle them in address book
- does it display these connections in
admin peers
result - does it not spam logs (see below)
2025-03-06 04:22:01.744 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:01.744 [WRN] PEERS: (other peers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:01.811 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:01.811 [WRN] PEERS: (other peers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:02.734 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:02.734 [WRN] PEERS: (other peers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:03.702 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:07.714 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:08.998 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:21.745 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:21.745 [WRN] PEERS: (other peers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:21.805 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:21.805 [WRN] PEERS: (other peers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:22.734 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:22.734 [WRN] PEERS: (other peers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
2025-03-06 04:22:23.703 [WRN] PEERS: (ConnectedPeers) peerInfo for 0259a5449cd9e91d968d10326f99e1fcbea86f986d8a84bda13c6f73296ee7984c#secp256k1: no addresses for peer
All of those are just my home internet's node that is behind a firewall and does not accept incoming, and does not advertise any routable addresses (only what kwild
sees, which is loopback addresses and the local LAN subnet).