Skip to content

Commit b8ad1c2

Browse files
committed
Add requirements to avoid rebroadcasting spent channels
After a channel has been spent, we temporarily keep it in our graph in case it was spent by a splice transaction: however, we must not rebroadcast the corresponding `channel_announcement` to our peers, who may otherwise think we're spamming them with invalid channels. We don't rebroadcast `channel_update`s either in that case, unless they have the `disable` bit set to 1, which indicates that the channel is likely closed.
1 parent bd17c49 commit b8ad1c2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

07-routing-gossip.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ The receiving node:
228228
- SHOULD store this `channel_announcement`.
229229
- once its funding output has been spent OR reorganized out:
230230
- SHOULD forget a channel after a 72-block delay.
231+
- MUST NOT rebroadcast this `channel_announcement` to its peers.
231232

232233
### Rationale
233234

@@ -485,7 +486,7 @@ The origin node:
485486
signal a channel's temporary unavailability (e.g. due to a loss of
486487
connectivity) OR permanent unavailability (e.g. prior to an on-chain
487488
settlement).
488-
- MAY sent a subsequent `channel_update` with the `disable` bit set to 0 to
489+
- MAY send a subsequent `channel_update` with the `disable` bit set to 0 to
489490
re-enable the channel.
490491
- MUST set `timestamp` to greater than 0, AND to greater than any
491492
previously-sent `channel_update` for this `short_channel_id`.
@@ -504,10 +505,13 @@ The origin node:
504505
- SHOULD keep accepting the previous channel parameters for 10 minutes
505506

506507
The receiving node:
507-
- if the `short_channel_id` does NOT match a previous `channel_announcement`,
508-
OR if the channel has been closed in the meantime:
508+
- if the `short_channel_id` does NOT match a previous `channel_announcement`:
509509
- MUST ignore `channel_update`s that do NOT correspond to one of its own
510510
channels.
511+
- if the channel output has been spent:
512+
- MUST ignore `channel_update`s, unless they have the `disable` bit set to 1.
513+
- MUST NOT rebroadcast `channel_update`s to its peers, unless they have the
514+
`disable` bit set to 1.
511515
- SHOULD accept `channel_update`s for its own channels (even if non-public),
512516
in order to learn the associated origin nodes' forwarding parameters.
513517
- if `signature` is not a valid signature, using `node_id` of the
@@ -870,6 +874,8 @@ The receiver:
870874
`first_timestamp` plus `timestamp_range`.
871875
- If a `channel_announcement` has no corresponding `channel_update`s:
872876
- MUST NOT send the `channel_announcement`.
877+
- If the funding output of the `channel_announcement` has been spent:
878+
- MUST NOT send the `channel_announcement`.
873879
- Otherwise:
874880
- MUST consider the `timestamp` of the `channel_announcement` to be the `timestamp` of a corresponding `channel_update`.
875881
- MUST consider whether to send the `channel_announcement` after receiving the first corresponding `channel_update`.

0 commit comments

Comments
 (0)