AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 57 Bitcoin

Adjust `batch_size` on `commit_sig` retransmission (#3147)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

81/100 · Strong
Adjust `batch_size` on `commit_sig` retransmission (#3147)

If we send a batch of `commit_sig` while our peer is sending their
`splice_locked` and we disconnect before receiving `revoke_and_ack`,
we will have less `commit_sig` messages to send on reconnection. But
we were still sending the old `batch_size`, so our peer was expecting
more `commit_sig` messages and waiting indefinitely.

This shows how hacky the `batch_size` mechanism is: fortunately, it was
removed from the official splice spec and replaced by the funding txid
matching the commitment, which gets rid of this edge case entirely.
But for existing phoenix users, while the splice spec isn't finalized,
we need to fix this scenario.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a Lightning Network channel bug where, after a disconnect, one side could re-send an outdated 'batch_size' value in commitment signature messages. The peer would then wait forever for extra messages that no longer exist, causing the payment channel to stall. The fix recalculates the correct batch size from the current active commitments before retransmission.

Recommended action

Apply the patch and run the updated NormalSplicesStateSpec regression tests. Node operators using Phoenix-style splices should upgrade to avoid channels getting stuck after reconnections during splice races.

Security signals we found

01

Protocol-level liveness failure / indefinite wait in Lightning channel state machine

02

Incorrect retransmission of stale tlvStream batch_size after commitment set changed

03

Race condition between splice_locked and commit_sig batching

04

Regression test added for the fixed edge case

Risk score

Why this scored 57/100

Our methodology →
Potential impact 18/30
Exploitability 8/25
Stealth signal 10/15
Affected reach 9/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.