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

verify proof of work on chain tips and warn when a tip goes stale

Public commit record

What the developer wrote

Authored by Craig Raw

60/100 · Adequate
verify proof of work on chain tips and warn when a tip goes stale
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds safety checks to the Bitcoin wallet Sparrow when it receives block-chain tip announcements from an Electrum server. It now verifies that the announced block header is properly formatted, not timestamped too far in the future, and meets the proof-of-work target encoded in the header itself. It also warns the user if the server stops sending new blocks for more than two hours, which can indicate a stale or malicious server. These changes reduce the risk of a hostile or malfunctioning server misleading the wallet about the state of the Bitcoin network.

Recommended action

Review the `verifyProofOfWork()` implementation in the `drongo` dependency to confirm it checks nBits correctly and is not bypassable. Ensure the 4-hour future-time window and 2-hour staleness threshold are appropriate for all supported networks. Consider whether invalid tips during subscription should disconnect or fall back to another server rather than only logging a warning.

Security signals we found

01

Adds proof-of-work verification on server-announced chain tips

02

Adds future-timestamp rejection for announced chain tips

03

Adds staleness warning when no new mainnet tip is received for >2 hours

04

Rate-limits UI warnings to avoid hostile-server spam

05

Caches parsed block header to avoid repeated deserialization

06

Throws `ServerException` on invalid initial tip during subscription setup

Risk score

Why this scored 62/100

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