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

synchronizer: rm redundant get_history call if new block mined unconf

Public commit record

What the developer wrote

Authored by SomberNight

85/100 · Strong
synchronizer: rm redundant get_history call if new block mined unconf

This is an optimisation and possible hardening against traffic analysis.

After a new block is mined, we sometimes receive "blockchain.scripthash.subscribe" notifications. If so, this is often due to the just mined block including mempool txs we already knew about.

Normally we would call the "blockchain.scripthash.get_history" RPC, to get full history of the affected scripthash.
Instead now we first optimistically guess that all mempool txs touching this scripthash just got mined and see if by assuming that we can reproduce the announced sh status.
- if yes, we saved a network RTT by not having to call "blockchain.scripthash.get_history"
- if no, we request the history from the server using the RPC
✓ 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 changes how the Electrum wallet reacts when a new Bitcoin block is mined. Instead of always asking the server for the full updated history of an address, it first tries to guess that the change is just because transactions it already knew about in the memory pool got included in the new block. If the guess matches the server's notification, it skips the extra network request. The commit message says this is an optimization and a possible hardening against traffic analysis.

Recommended action

Treat as a routine privacy-hardening optimization. Reviewers should verify that the optimistic height guess cannot cause incorrect history states to be accepted, especially in edge cases involving reorgs, conflicting transactions, or multiple transactions affecting the same scripthash in one block. The fallback to the full RPC when the guess mismatches provides a safety net.

Security signals we found

01

Commit message explicitly frames change as 'optimisation and possible hardening against traffic analysis'

02

Reduces number of 'blockchain.scripthash.get_history' RPCs sent after a new block

03

Could reduce network fingerprinting of which addresses belong to the wallet when a block is mined

04

No input validation changes, no cryptographic changes, no privilege changes

Risk score

Why this scored 26/100

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