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

Address ChannelState inconsistency throughout splicing

Public commit record

What the developer wrote

Authored by Wilmer Paulino

73/100 · Adequate
Address ChannelState inconsistency throughout splicing

Once a channel open has become locked (i.e., we've entered
`ChannelState::ChannelReady`), the channel is intended to remain within
this state for the rest of its lifetime until shutdown. Previously, we
had assumed a channel being spliced would go through the `ChannelState`
lifecycle again starting from `NegotiatingFunding` but skipping
`AwaitingChannelReady`. This inconsistency departs from what we strive
to achieve with `ChannelState` and also makes the state of a channel
harder to reason about.

This commit ensures a channel undergoing a splice remains in
`ChannelReady`, clearing the quiescent flag once the negotiation is
complete. Dual funding is unaffected by this change as the channel is
being opened and we want to maintain the same `ChannelState` lifecycle.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a state-machine inconsistency in how the Lightning node tracks the lifecycle of a channel when it is being spliced. Previously, a splice incorrectly moved the channel back through the same states used when a channel is first being opened. The change keeps the channel in its normal operating state during a splice and only clears a temporary 'quiet' flag once negotiation is done. This makes the code easier to reason about and prevents potential bugs where the channel could be treated as not-yet-open when it is actually already active.

Recommended action

Review and merge as a correctness fix. Consider whether any downstream logic depends on a spliced channel briefly entering FundingNegotiated/AwaitingChannelReady, and add regression tests covering splice state transitions and quiescent flag clearing. No immediate emergency response is indicated, but the fix should be included in the next release.

Security signals we found

01

State machine lifecycle correction for splicing

02

Prevents ChannelReady channel from being re-entered into pre-ready states during splice

03

Clears quiescent flag only after splice negotiation completes

04

Adds debug_assertions to enforce expected state during interactive funding completion

05

Removes TODO comment indicating prior known splicing state transition issue

Risk score

Why this scored 42/100

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