From 0d10541b73d97ed5f56b02564830048506e060ab Mon Sep 17 00:00:00 2001 From: t-bast Date: Tue, 28 Jun 2022 09:40:14 +0200 Subject: [PATCH] Repurpose flag to be more general The flag means that the update shouldn't be broadcast to the network: it must be kept between the two peers and only included in payment errors. --- 07-routing-gossip.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/07-routing-gossip.md b/07-routing-gossip.md index f33797c9a..d091f4ed6 100644 --- a/07-routing-gossip.md +++ b/07-routing-gossip.md @@ -425,13 +425,12 @@ individual bits: | 0 | `direction` | Direction this update refers to. | | 1 | `disable` | Disable the channel. | -The `message_flags` bitfield is used to provide additional details about how to -interpret some of the message fields: +The `message_flags` bitfield is used to provide additional details about the message: -| Bit Position | Name | Field | -| ------------- | ------------------------- | -------------------------------- | -| 0 | `must_be_one` | | -| 1 | `scid_alias` | `short_channel_id` | +| Bit Position | Name | +| ------------- | ---------------| +| 0 | `must_be_one` | +| 1 | `dont_forward` | The `node_id` for the signature verification is taken from the corresponding `channel_announcement`: `node_id_1` if the least-significant bit of flags is 0 @@ -446,10 +445,7 @@ The origin node: `announce_channel` bit was not set). - MUST set the `short_channel_id` to either an `alias` it has received from the peer, or the real channel `short_channel_id`. - - if it sets `short_channel_id` to an `alias`: - - MUST set `scid_alias` to 1 in `message_flags` - - otherwise: - - MUST set `scid_alias` to 0 in `message_flags` + - MUST set `dont_forward` to 1 in `message_flags` - MUST NOT forward such a `channel_update` to other peers, for privacy reasons. - Note: such a `channel_update`, one not preceded by a