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

sync to the announced tip before serving a stored header when a reorg lengthens the chain, so a proof is not checked against a replaced block

Public commit record

What the developer wrote

Authored by Craig Raw

50/100 · Thin
sync to the announced tip before serving a stored header when a reorg lengthens the chain, so a proof is not checked against a replaced block
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a bug in how Sparrow Wallet verifies Bitcoin block headers during a blockchain reorganization (reorg). Previously, if a reorg made the chain longer, the wallet could serve an old, replaced block header to check a payment proof, instead of first syncing to the newly announced longer chain. This could let a malicious or mistaken server make a transaction proof look valid against the wrong block. The fix forces a sync to the announced tip before serving any stored header when the announced tip is newer or on a different branch than what is locally stored.

Recommended action

Treat this as a security-relevant correctness fix. Review whether released versions need a patch or advisory, especially because SPV/proof verification against wrong headers can lead to accepting invalid transactions. Users should upgrade to a release containing this commit. Wallet developers should audit other paths that serve stored headers before announced-tip reconciliation.

Security signals we found

01

Incorrect block header served during chain reorg

02

Proof verification could be checked against replaced block

03

Missing sync path when announced tip extends beyond local store

04

Fix includes regression tests for reorg handling

05

Logic change from else-if to independent if ensures syncHeadersTo runs after reorg sync

Risk score

Why this scored 69/100

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