Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOLT 1: adds remote address to optional init_tlvs (IP discovery) #917

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions 01-messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,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

Expand All @@ -277,6 +281,10 @@ 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 remote IP address (and port) of an
incoming connection, if the node is the receiver and the connection was done
via IP.
- SHOULD NOT set private addresses as `remote_addr`.

The receiving node:
- MUST wait to receive `init` before sending any other messages.
Expand All @@ -290,6 +298,7 @@ The receiving node:
- MAY close the connection.
- if the feature vector does not set all known, transitive dependencies:
- MUST close the connection.
- MAY use the `remote_addr` to update its `node_annoucement`

#### Rationale

Expand Down