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

Merge PR 'Use preferred sPK of watched txn in electrum, not rand ones' (#4867)

Public commit record

What the developer wrote

Authored by tnull

81/100 · Strong
Merge PR 'Use preferred sPK of watched txn in electrum, not rand ones' (#4867)

from 2026-08-spk-electrum into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4867
Reviewed-by: tnull <tnull@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 improves how the Lightning Dev Kit's Electrum and Esplora transaction-sync clients track watched Bitcoin transactions. Previously, the code ignored the script pubkey (the 'address' associated with a transaction) supplied when registering a transaction, and instead picked an arbitrary output from the transaction when querying Electrum servers. The patch now records and prefers the script pubkey(s) the caller actually registered, falling back to an arbitrary non-OP_RETURN output only when needed. This makes the wallet more robust against Electrum servers that may not index certain script types (like OP_RETURN), and against callers that register a transaction with an incorrect script pubkey. It is a hardening fix rather than a clear-cut vulnerability patch, because the commit message and diff do not describe a specific exploitable bug.

Recommended action

Treat as a reliability and defense-in-depth improvement. Users relying on Electrum-based chain sync in LDK should upgrade to ensure transaction confirmation detection works even when a watched transaction's only indexed output differs from the one the code previously picked arbitrarily. No immediate emergency response is warranted based on the supplied materials, but normal patch adoption is sensible.

Security signals we found

01

Previously ignored `script_pubkey` argument in `register_tx` for transaction watchers

02

Electrum script-history queries previously used an arbitrary transaction output, which could be OP_RETURN and therefore unindexed by some Electrum servers

03

New logic prefers caller-supplied script pubkey and falls back to non-OP_RETURN outputs

04

Commit message frames change as a correctness/reliability improvement, not as a security fix

05

No CVE, advisory, or vendor security disclosure referenced in commit or supplied materials

Risk score

Why this scored 44/100

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