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

rpc: fix getblockstats UTXO overhead accounting

Public commit record

What the developer wrote

Authored by Lőrinc

78/100 · Adequate
rpc: fix getblockstats UTXO overhead accounting

`Coin` packs height and the coinbase flag into a single 32-bit value, so `utxo_size_inc(_actual)` should not count an additional boolean.

Update the calculation and adjust the `rpc_getblockstats` test expectations.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes an accounting error in a Bitcoin Core RPC command called getblockstats. The command reports how much UTXO set size grows when a block is processed. The old code incorrectly counted the coinbase flag as a separate boolean byte, but in reality it is packed into the same 32-bit value as the block height. The fix removes that extra byte from the overhead calculation and updates the corresponding test expectations. It is a correctness bug in statistics output, not a security vulnerability that lets anyone steal funds or crash nodes.

Recommended action

No security response required. Treat as a normal bugfix/correctness patch. Users relying on getblockstats for UTXO growth metrics should expect slightly lower utxo_size_inc values after upgrading.

Security signals we found

01

Incorrect size accounting in non-consensus RPC statistics

02

No memory safety, authentication, or network parsing changes

03

No consensus, wallet, or mempool logic modified

Risk score

Why this scored 21/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 2/15
Affected reach 3/15
Confidence 9/10
Evidence quality 5/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.