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

adb: change API of util.TxMinedInfo: height() is now always SPV-ed

Public commit record

What the developer wrote

Authored by SomberNight

50/100 · Thin
adb: change API of util.TxMinedInfo: height() is now always SPV-ed
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit changes how Electrum decides whether a Bitcoin transaction is truly confirmed. Previously, parts of the code could treat a transaction as confirmed just because an Electrum server claimed it was mined at a certain block height, even before the wallet had independently verified that block header through SPV (Simple Payment Verification). Now, the wallet's central `TxMinedInfo.height()` method returns a real block height only if the transaction has also passed SPV verification; otherwise it reports the transaction as unconfirmed. This closes a class of bugs where a malicious or buggy Electrum server could trick the wallet into thinking a transaction was confirmed when it was not, which could affect spending decisions, Lightning channel state, swap refunds, and user-visible confirmation counts.

Recommended action

Treat this as a security-hardening fix. Review that all new `.height()` callers correctly handle the `0` (unconfirmed) return value for previously-mined-but-not-yet-SPV-ed transactions, especially in automated paths such as Lightning channel state transitions, submarine swap refunds, and tx batching. Ensure downstream release notes mention that unverified heights are no longer treated as confirmed. No immediate emergency response is warranted absent a disclosed exploit, but users running older versions should upgrade to avoid trusting a single Electrum server's height claims.

Security signals we found

01

Centralizes trust decision: unverified block heights are downgraded to unconfirmed unless SPV `conf >= 1` exists

02

Touches consensus-critical wallet logic: coin selection, channel state, swap refunds, and transaction replacement all depend on height

03

Removes direct `.height` reads in favor of `.height()`, reducing risk of accidental use of unverified data

04

Adds test changes showing the new behavior is expected (e.g., `add_verified_tx` with `conf=1` is now required for a tx to be considered confirmed)

05

No explicit CVE, advisory, or vendor security disclosure is present in the supplied materials

Risk score

Why this scored 63/100

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