|
| 1 | +``` |
| 2 | +bLIP: 43 |
| 3 | +Title: Alternative Addresses for Peer Connections |
| 4 | +Status: Active |
| 5 | +Author: Max Rantil <[email protected]> |
| 6 | +Created: 2024-08-31 |
| 7 | +License: CC0 |
| 8 | +``` |
| 9 | + |
| 10 | +## Abstract |
| 11 | + |
| 12 | +The `alt_addr` message introduces a mechanism for nodes to specify private alternative connection addresses for peers. These addresses facilitate reconnections between nodes with an existing relationship, bypassing the public gossip protocol. This allows peers with an established channel or history to use alternative addresses for improved privacy, reliability, or latency. |
| 13 | + |
| 14 | +## Copyright |
| 15 | + |
| 16 | +This bLIP is licensed under the CC0 license. |
| 17 | + |
| 18 | +## Motivation |
| 19 | + |
| 20 | +The primary motivations for introducing alternative addresses are: |
| 21 | + |
| 22 | +- Enhanced privacy: By allowing peers to use private addresses not disclosed in the public network, the risk of traffic analysis is reduced. |
| 23 | +- Improved reliability: Alternative addresses can provide fallback options if the primary address becomes unreachable. |
| 24 | +- Potential latency improvements: Private addresses might offer more direct or optimized network paths between peers. |
| 25 | +- Greater control: Nodes can selectively share alternative addresses with trusted peers, maintaining public presence while offering improved connectivity to specific partners. |
| 26 | + |
| 27 | +## Specification |
| 28 | + |
| 29 | +### The `alt_addr` Message |
| 30 | + |
| 31 | +1. **type**: 209 (`peer_alt_addr`) |
| 32 | +2. **data**: |
| 33 | + - [`channel_id`:`channel_id`] |
| 34 | + - [`u8`:`addr_len`] |
| 35 | + - [`addr_len*byte`:`addr`] |
| 36 | + |
| 37 | +### Requirements |
| 38 | + |
| 39 | +#### Sending Node |
| 40 | + |
| 41 | +- **SHOULD** send `alt_addr` when a new connection address is necessary for enhanced privacy or network performance. |
| 42 | +- **MAY** send an empty `addr` to clear any previously stored alternative addresses. |
| 43 | +- **MUST** store a record of the peers to whom it has sent its `alt_addr` for future verification. |
| 44 | +- **MUST** verify that an incoming connection attempt using `alt_addr` is from the specific peer to whom it has previously provided that exact address. |
| 45 | +- **MUST** reject connection attempts using `alt_addr` if it has not sent that specific `alt_addr` to the connecting peer. |
| 46 | + |
| 47 | +#### Receiving Node |
| 48 | + |
| 49 | +- **MUST** store the `alt_addr` in persistent storage upon successful validation. |
| 50 | +- **MUST** use the stored `alt_addr` when initiating a connection to the peer that provided it. |
| 51 | +- **MAY** continue using the original address until `alt_addr` is fully validated. |
| 52 | + |
| 53 | +## Rationale |
| 54 | + |
| 55 | +By allowing nodes to use private, alternative connection addresses, this proposal enables a more controlled and secure network environment, where peers can selectively manage who has access to their alternative addresses without exposing these addresses to the wider public network. |
| 56 | + |
| 57 | +This feature also complements other address management features such as `alt-bind-addr` and `alt-announce-addr`, providing nodes with additional flexibility in how they present and manage their network addresses. |
| 58 | + |
| 59 | +## Backwards Compatibility |
| 60 | + |
| 61 | +This proposal does not affect backward compatibility as it introduces an optional message that nodes can choose to implement without impacting the existing protocol. |
0 commit comments