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

lightningd: use a blockdepth callback instead of a watch_txid.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
lightningd: use a blockdepth callback instead of a watch_txid.

This is more explicit, and will work far better with an external watcher.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit refactors how Core Lightning tracks the confirmation depth of a channel's funding transaction. Instead of watching a specific transaction ID, it now watches the block height at which the funding transaction was found. The change is described by the author as making the code more explicit and better suited to external blockchain watchers. There is no direct evidence in the commit that this fixes a security vulnerability, but it does touch reorganization handling and could affect how the node reacts when a funding transaction is removed from the blockchain.

Recommended action

Treat as a normal code-quality/architectural refactor. Reviewers should verify that the new blockdepth watcher correctly handles all channel states during reorgs and that removing the old txid watch does not miss edge cases (e.g., funding transaction replaced or malleated before lock-in). No urgent security action is indicated by the commit itself.

Security signals we found

01

Refactors blockchain reorg/confirmation handling for channel funding

02

Changes reorg callback semantics: now returns DELETE_WATCH and resets channel depth

03

Removes assertion that watched txid equals current channel funding txid

04

Adds explicit block-height watcher for funding confirmation depth

05

Splits funding spend watch from funding discovery watch

Risk score

Why this scored 23/100

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