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

Merge initial and retry stfu send paths

Public commit record

What the developer wrote

Authored by Wilmer Paulino

90/100 · Strong
Merge initial and retry stfu send paths

In 15b04b5, we fixed a case in `FundedChannel::try_send_stfu` where we'd
send `stfu` unnecessarily for a new splice while one is already pending.
The same case also existed in `FundedChannel::send_stfu`, but was not
fixed. There's no good reason for both of these methods to exist, so we
merge them into one as `FundedChannel::try_send_stfu`. We also add a
test that reproduces the `FundedChannel::send_stfu` issue to ensure it's
fixed and does not regress.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in the Lightning Dev Kit where a node could send a 'stop the flow and update' (stfu) message too early during a channel splice. If a splice was already pending and a new one was requested, the old code path could send stfu prematurely, potentially causing the splice protocol to get out of sync with the peer. The fix merges two similar code paths into one and adds a regression test.

Recommended action

Review the merged try_send_stfu logic to confirm all prior send_stfu invariants (debug_asserts, initiator flag handling) are preserved. Run the new splicing regression test and existing splice-related tests. Consider whether any other duplicated quiescence paths need similar unification.

Security signals we found

01

Protocol-state desynchronization during splicing

02

Missing guard condition duplicated across two code paths

03

Regression test added for premature stfu behavior

Risk score

Why this scored 37/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 6/15
Affected reach 7/15
Confidence 7/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.