diff --git a/02-peer-protocol.md b/02-peer-protocol.md index 4052c6965..762390d40 100644 --- a/02-peer-protocol.md +++ b/02-peer-protocol.md @@ -433,9 +433,12 @@ The sender: - MUST NOT send `funding_locked` unless outpoint of given by `funding_txid` and `funding_output_index` in the `funding_created` message pays exactly `funding_satoshis` to the scriptpubkey specified in [BOLT #3](03-transactions.md#funding-transaction-output). - MUST set `next_per_commitment_point` to the per-commitment point to be used - for the following commitment transaction, derived as specified in + for commitment transaction #1, derived as specified in [BOLT #3](03-transactions.md#per-commitment-secret-requirements). - - SHOULD set `short_channel_id` `alias`. + - if `option_scid_alias_only` was negotiated: + - MUST set `short_channel_id` `alias`. + - otherwise: + - SHOULD set `short_channel_id` `alias`. - if it sets `alias`: - if the `announce_channel` bit was set in both `open_channel` and `accept_channel`: - SHOULD initially set `alias` to value not related to the real `short_channel_id`. @@ -444,6 +447,8 @@ The sender: - MUST set `alias` to a value not related to the real `short_channel_id`. - MUST NOT send the same `alias` for multiple peers. - MUST always recognize the `alias` as a `short_channel_id` for incoming HTLCs to this channel. + - if `option_scid_alias_only` was negotiated: + - MUST NOT allow incoming HTLCs to this channel using the real `short_channel_id` - MAY send multiple `funding_locked` messages with different `alias` values. - otherwise: - MUST wait until the funding transaction has reached `minimum_depth` before sending this message. @@ -457,6 +462,8 @@ A non-funding node (fundee): The receiver: - MAY use any of the `alias` it received, in BOLT 11 `r` fields. + - if `option_scid_alias_only` was negotiated: + - MUST NOT use the real `short_channel_id` in BOLT 11 `r` fields. From the point of waiting for `funding_locked` onward, either node MAY fail the channel if it does not receive a required response from the diff --git a/09-features.md b/09-features.md index b508bac70..4d3a097e1 100644 --- a/09-features.md +++ b/09-features.md @@ -41,6 +41,7 @@ The Context column decodes as follows: | 20/21 | `option_anchor_outputs` | Anchor outputs | IN | `option_static_remotekey` | [BOLT #3](03-transactions.md) | | 22/23 | `option_anchors_zero_fee_htlc_tx` | Anchor commitment type with zero fee HTLC transactions | IN | | [BOLT #3][bolt03-htlc-tx], [lightning-dev][ml-sighash-single-harmful]| | 26/27 | `option_shutdown_anysegwit` | Future segwit versions allowed in `shutdown` | IN | | [BOLT #2][bolt02-shutdown] | +| 46/47 | `option_scid_alias_only`| Always use negotiated channel aliases for routing | IN | | [BOLT #2][bolt02-funding-locked] | ## Requirements @@ -84,6 +85,7 @@ This work is licensed under a [Creative Commons Attribution 4.0 International Li [bolt02-open]: 02-peer-protocol.md#the-open_channel-message [bolt03-htlc-tx]: 03-transactions.md#htlc-timeout-and-htlc-success-transactions [bolt02-shutdown]: 02-peer-protocol.md#closing-initiation-shutdown +[bolt02-funding-locked]: 02-peer-protocol.md#the-funding_locked-message [bolt04]: 04-onion-routing.md [bolt07-sync]: 07-routing-gossip.md#initial-sync [bolt07-query]: 07-routing-gossip.md#query-messages