diff --git a/01-messaging.md b/01-messaging.md index 678393e1b..2562856e6 100644 --- a/01-messaging.md +++ b/01-messaging.md @@ -259,8 +259,12 @@ The `features` field MUST be padded to bytes with 0s. 2. data: * [`...*chain_hash`:`chains`] + 1. type: 3 (`remote_addr`) + 2. data: + * `address descriptor` (1 byte type and data, see BOLT 7) The optional `networks` indicates the chains the node is interested in. +The optional `remote_addr` can be used to circumvent NAT issues. #### Requirements @@ -271,6 +275,9 @@ The sending node: - SHOULD NOT set features greater than 13 in `globalfeatures`. - SHOULD use the minimum length required to represent the `features` field. - SHOULD set `networks` to all chains it will gossip or open channels for. + - SHOULD set `remote_addr` to reflect the public IP address of an incoming + connection, if the node is the receiver and the connection was done via IP. + IP addresses that are within private networks (RFC-1918) must not be used. The receiving node: - MUST wait to receive `init` before sending any other messages. @@ -284,6 +291,7 @@ The receiving node: - MAY fail the connection. - if the feature vector does not set all known, transitive dependencies: - MUST fail the connection. + - MAY use the `remote_addr` to update its `node_annoucement` #### Rationale