Skip to content

channeld: hold shutdown until a signed splice locks - #72

Merged
kwsantiago merged 3 commits into
blake2b-unifiedfrom
splice-hold-shutdown
Oct 29, 2026
Merged

kwsantiago merged 3 commits into
blake2b-unifiedfrom
splice-hold-shutdown

Conversation

@kwsantiago

Copy link
Copy Markdown

BOLT 2 says a node must not send shutdown while a splice transaction is unlocked. channeld now holds our shutdown while a splice both sides have signed is pending, and sends it once the splice locks. If the peer sends shutdown first, we reply right away, since waiting on a peer that may never lock the splice would hang the close.

  • channeld refuses splice_init once either side has sent shutdown. An RBF of the pending splice is still accepted while our shutdown is held.
  • lightningd keeps watching the splice depth in CHANNELD_SHUTTING_DOWN, including after a restart, and handles a splice lock in that state without announcing the new scid.
  • A close requested after splice signatures are exchanged stays in CHANNELD_SHUTTING_DOWN, and the splice is still broadcast.
  • New dev option --dev-shutdown-during-splice sends shutdown without waiting, to test peers that do not hold it.
  • New test test_splice_holds_shutdown_until_locked covers the hold, an RBF while held, a restart while held, and a mutual close of the locked splice output.

Changelog-None

@kwsantiago
kwsantiago merged commit a33eb33 into blake2b-unified Oct 29, 2026
45 of 50 checks passed
@kwsantiago
kwsantiago deleted the splice-hold-shutdown branch October 29, 2026 01:41
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.

1 participant