Skip to content

Retransmit splice_locked to peers resuming signing - #30

Open
amackillop wants to merge 1 commit into
lsp-0.2.5from
austin_mdk-1423_retransmit-splice-locked
Open

Retransmit splice_locked to peers resuming signing#30
amackillop wants to merge 1 commit into
lsp-0.2.5from
austin_mdk-1423_retransmit-splice-locked

Conversation

@amackillop

Copy link
Copy Markdown

A peer that lost our tx_signatures (crashed before processing or persisting them) reestablishes with next_funding set for the splice. Its splice funding is still in funding_negotiation at that point, so it cannot apply the my_current_funding_locked TLV from our channel_reestablish: the inference only matches negotiated funding, and the TLV is processed exactly once. If we had already locked the splice, nothing ever conveys our lock again. The peer completes signing via the retransmitted signatures, locks, and then waits forever for our splice_locked while we consider the exchange done and eventually promote. Our next commitment_signed is not a batch, and the peer force-closes with "Got a single commitment_signed message when expecting a batch".

A staging client channel died this way on 2026-08-11 (MDK-1423): the LSP restarted between tx_signatures and the completed splice_locked exchange, and an MDK 0.18.0 wallet, whose persisted state apparently predated the LSP's tx_signatures, force-closed on the first payment forwarded after reconnect.

Retransmit splice_locked explicitly when the peer's next_funding names a splice we have locked, ordered after the retransmitted tx_signatures so the peer finishes its signing session before it processes the lock. This is deliberately scoped: a peer whose signing session is complete can already infer the lock from my_current_funding_locked (covered by test_splice_reestablish), and retransmitting unconditionally would send redundant messages on every reconnect.

Upstream fixed the same bug on main in 5434015 ("Retransmit splice_locked for 0-conf channels missing tx_signatures"), unreleased as of 0.3.0-beta1, whose retransmission only covers locks that were absent from our reestablish TLV. This is a minimal backport of its semantics for the lsp-0.2.5 branch, keyed off the peer's next_funding rather than our tx_signatures retransmission so it also fires when we cannot retransmit signatures but the peer can still complete the splice from on-chain confirmations. It interops with already deployed 0.2.0-era clients, which handle an explicit splice_locked fine but have no recovery path if it never arrives.

A peer that lost our tx_signatures (crashed before processing or
persisting them) reestablishes with next_funding set for the splice.
Its splice funding is still in funding_negotiation at that point, so it
cannot apply the my_current_funding_locked TLV from our
channel_reestablish: the inference only matches negotiated funding, and
the TLV is processed exactly once. If we had already locked the splice,
nothing ever conveys our lock again. The peer completes signing via the
retransmitted signatures, locks, and then waits forever for our
splice_locked while we consider the exchange done and eventually
promote. Our next commitment_signed is not a batch, and the peer
force-closes with "Got a single commitment_signed message when
expecting a batch".

A staging client channel died this way on 2026-08-11 (MDK-1423): the
LSP restarted between tx_signatures and the completed splice_locked
exchange, and an MDK 0.18.0 wallet, whose persisted state apparently
predated the LSP's tx_signatures, force-closed on the first payment
forwarded after reconnect.

Retransmit splice_locked explicitly when the peer's next_funding names
a splice we have locked, ordered after the retransmitted tx_signatures
so the peer finishes its signing session before it processes the lock.
This is deliberately scoped: a peer whose signing session is complete
can already infer the lock from my_current_funding_locked (covered by
test_splice_reestablish), and retransmitting unconditionally would send
redundant messages on every reconnect.

Upstream fixed the same bug on main in 5434015 ("Retransmit
splice_locked for 0-conf channels missing tx_signatures"), unreleased
as of 0.3.0-beta1, whose retransmission only covers locks that were
absent from our reestablish TLV. This is a minimal backport of its
semantics for the lsp-0.2.5 branch, keyed off the peer's next_funding
rather than our tx_signatures retransmission so it also fires when we
cannot retransmit signatures but the peer can still complete the splice
from on-chain confirmations. It interops with already deployed
0.2.0-era clients, which handle an explicit splice_locked fine but have
no recovery path if it never arrives.
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