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

Add manual-funding broadcast tracking to ChannelMonitor

Public commit record

What the developer wrote

Authored by Martin Saposnic

85/100 · Strong
Add manual-funding broadcast tracking to ChannelMonitor

Adds `is_manual_broadcast` and `funding_seen_onchain` flags to track
whether the channel uses manual funding broadcasts and whether we've
seen the funding tx confirm.

This enables deferring holder commitment broadcasts until after the
funding tx is actually broadcast. For example, in LSPS2 with
client_trusts_lsp=true, the LSP may defer broadcasting the funding tx
until the client claims an HTLC, so we need to avoid broadcasting
commitments that reference outputs that don't exist yet.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit adds internal bookkeeping to LDK's channel monitor so it can tell whether a channel uses 'manual' funding-transaction broadcasts and whether that funding transaction has actually appeared on-chain yet. The goal is to stop the node from broadcasting its own commitment transaction (a recovery/closing transaction) before the funding transaction exists on-chain, which would be pointless and could leak information or waste fees. It is a defensive correctness fix, not a patch for an active exploit.

Recommended action

Review the follow-up commits that wire funding_seen_onchain into the broadcast-gating logic and ensure the flag is set reliably when the funding transaction is first seen, including across reorgs and monitor restarts. Verify that the default value fallback for old monitors is safe in all channel types.

Security signals we found

01

Prevents premature holder commitment broadcasts for channels whose funding transaction is not yet on-chain

02

Adds backward-compatible persistence for new channel-monitor state

03

Defensive fix for LSPS2 client_trusts_lsp=true scenario where LSP may defer funding broadcast

04

No visible input validation, cryptographic, or memory-safety changes

Risk score

Why this scored 41/100

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