Skip to content

Conversation

@t-bast
Copy link
Collaborator

@t-bast t-bast commented Jun 17, 2025

In #1044, we introduced a 12-blocks delay before considering a channel closed when we see a spending confirmation on-chain. This ensures that if the channel was spliced instead of closed, the channel participants are able to broadcast a new channel_announcement to the rest of the network. If this new channel_announcement is received by renote nodes before the 12-blocks delay, the channel can keep its history in path finding scoring/reputation, which is important.

We then realize that 12 blocks probably wasn't enough to allow this to happen: some implementations default to 8 confirmations before sending splice_locked, and allow node operators to increase this value. We thus bump this delay to 72 blocks to allow more time before channels are removed from the local graph.

We also add requirements in the 2nd commit to avoid rebroadcasting announcement for spent channels, because our peers may otherwise think we're trying to spam them.

In lightning#1044, we introduced a 12-blocks delay before considering a channel
closed when we see a spending confirmation on-chain. This ensures that
if the channel was spliced instead of closed, the channel participants
are able to broadcast a new `channel_announcement` to the rest of the
network. If this new `channel_announcement` is received by renote nodes
before the 12-blocks delay, the channel can keep its history in path
finding scoring/reputation, which is important.

We then realize that 12 blocks probably wasn't enough to allow this to
happen: some implementations default to 8 confirmations before sending
`splice_locked`, and allow node operators to increase this value. We
thus bump this delay to 72 blocks to allow more time before channels
are removed from the local graph.
t-bast added a commit to ACINQ/eclair that referenced this pull request Jun 17, 2025
We previously waited for 12 blocks before removing spent channels from
our graph: the spec updates this delay to 72 blocks to allow more time
for splice announcement in lightning/bolts#1270.

We also make this configurable, which can simplify testing and allows
nodes to wait even longer if they wish.
t-bast added a commit to ACINQ/eclair that referenced this pull request Jun 17, 2025
We previously waited for 12 blocks before removing spent channels from
our graph: the spec updates this delay to 72 blocks to allow more time
for splice announcement in lightning/bolts#1270.

We also make this configurable, which can simplify testing and allows
nodes to wait even longer if they wish.
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.
Copy link
Collaborator

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⛩️

Some implementations don't always check whether channels are spent
before relaying gossip, and thus cannot guarantee that they'll only
relay unspent channels. We relax the requirements to a `SHOULD NOT`
instead of a `MUST NOT` to reflect that.
@ziggie1984
Copy link
Contributor

I am not sure if implementations which do not support splicing yet need to implement this delay. You mention it is only important for local scoring/reputation history. Moreover how do the nodes which spliced correlated the new channel_announcement with the old one ? Because the channel_announcment has no trace of the old funding tx ?

@t-bast
Copy link
Collaborator Author

t-bast commented Sep 9, 2025

I am not sure if implementations which do not support splicing yet need to implement this delay.

It is important for all implementations to support this, even if they don't support actually creating splice transactions, otherwise they're penalizing implementations that use splicing by removing valid channels from their path-finding graph.

Ideally, what all implementations should ship right now is that when you detect a transaction that spends a public channel, instead of considering it closed and removing it from your network graph, you should:

  • mark it as spent (tentatively closed?), keep the spending txid around (note that RBF may happen, so you should keep a set of spending txids, not just one), and wait for 72 blocks before considering it closed and removing it from path-finding
  • when you receive a channel_announcement that matches one of the stored txids:
    • update your graph to use this channel_announcement instead of the previous one for this channel
    • stop considering this channel potentially closed
  • note that if the channel was really closed and not spliced, the nodes would have sent a channel_update with the disabled bit set, so this doesn't prevent you from detecting channels that are really closed

It's as simple as that! This has been eclair's behavior for the past ~6 months already, not sure about other implementations' status.

@ziggie1984
Copy link
Contributor

It is important for all implementations to support this, even if they don't support actually creating splice transactions, otherwise they're penalizing implementations that use splicing by removing valid channels from their path-finding graph.

Thank you so much for this detailed explanation, we will implement it on LND side, likely in LND 21 because LND 20 is already in its final stages.

@t-bast
Copy link
Collaborator Author

t-bast commented Sep 9, 2025

Awesome thanks 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants