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

Merge PR 'Preserve conflicting output watches' (#5557)

Public commit record

What the developer wrote

Authored by Matt Corallo

81/100 · Strong
Merge PR 'Preserve conflicting output watches' (#5557)

from tnull/2026-10-preserve-output-watches into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5557
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This change fixes a bug in how the Lightning Dev Kit's transaction-sync clients (Electrum and Esplora) keep track of watched Bitcoin outputs. Previously, if the same output was registered more than once with different script pubkeys (for example, one real and one bogus), the later registration would overwrite the earlier one. This could cause the client to stop monitoring the real output, potentially missing when it is spent on-chain. The fix stores all registered script pubkeys for each output instead of keeping only the last one, so no conflicting watch can hide a legitimate spend.

Recommended action

Treat this as a security-relevant correctness fix. Users relying on Electrum or Esplora transaction sync should upgrade to a release containing this commit, especially if their channel monitor may register outputs multiple times (e.g., on restart or reconnection). Review whether any missed spends could have affected channel state in running nodes.

Security signals we found

01

State overwrite bug in output watch tracking

02

Potential missed on-chain spend detection

03

Conflicting registrations could suppress legitimate script pubkey monitoring

04

Reorg handling relies on preserved watch state

05

Fix includes regression tests for ordering and reorg scenarios

Risk score

Why this scored 61/100

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