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

Allow monitor_pending_channel_ready on resumed outbound channels

Public commit record

What the developer wrote

Authored by auto-pr-bot

91/100 · Strong
Allow monitor_pending_channel_ready on resumed outbound channels

Resuming a channel whose initial monitor persistence completed while the
node was down can race with chain sync: if the funding transaction was
broadcast before the node went down and confirmed to the required depth
while it was down, syncing the chain marks the still-paused channel's
channel_ready as pending. monitor_updating_restored then hit an assertion
that an outbound, non-zero-conf channel can never have
monitor_pending_channel_ready set, turning a stuck channel into a panic at
every startup - nothing is persisted before the panic, so the node could
never come back up.

After a reload from a ChannelManager serialized before the broadcast, LDK
did broadcast the funding transaction (in the prior process), so the
funding can legitimately have confirmed; drop the assertion and just send
channel_ready. Adds a test which confirms the funding transaction to the
required depth between the reload and the first background-event
processing, matching the startup ordering that hits the removed assertion.

Fixes #5603

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/issues/5603
Authored-By: matt/GLM-5.3-Flash-GGUF:Q4_K_XL <goose@users.noreply.local>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug where a Lightning node could crash in a loop every time it started up. The crash happened when a channel's funding transaction had already confirmed while the node was offline, but the node still had old saved state. The old code wrongly assumed this situation was impossible and panicked. The fix removes that incorrect assumption and lets the node resume the channel normally. It is a denial-of-service/availability bug, not a theft-of-funds bug, and it can only be triggered by the node's own saved state and normal blockchain activity.

Recommended action

Apply the patch. It is a targeted bug fix with a regression test and should be backported to affected release branches. No immediate incident response is required unless operators have observed unrecoverable startup panics after funding transactions confirmed during downtime.

Security signals we found

01

Assertion failure/panic on startup caused by stale ChannelManager state

02

Denial of service: node cannot restart due to recurring panic

03

Race condition between chain sync and background event processing during channel resume

04

Fix removes overly strict invariant that did not account for prior-process funding broadcast

Risk score

Why this scored 50/100

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