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

fuzz: keep `coinscache_sim` backend free of spent coins

Public commit record

What the developer wrote

Authored by Andrew Toth

83/100 · Strong
fuzz: keep `coinscache_sim` backend free of spent coins

`CoinsViewBottom` roughly simulates a memory-backed `CCoinsViewDB`, which never stores spent coins.

Stop returning spent coins from `GetCoin()`, erase spent entries in `BatchWrite()`, and tighten comparisons to expect `std::nullopt` when the simulator has no coin.

Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
✓ Specific, 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 is a change to a Bitcoin Core fuzz test, not to the live Bitcoin network code. It fixes a test-only simulator so that it no longer pretends that spent coins still exist in the underlying database. This makes the fuzz test behave more like the real code, but it does not fix a vulnerability in production Bitcoin Core.

Recommended action

No production action needed. Review as normal test-quality improvement. If auditing, confirm no production code paths are affected.

Security signals we found

01

Test-only code change

02

Removes artificial spent-coin behavior in fuzz simulator

03

Adds assertions to enforce unspent coins in mock backend

04

No change to consensus, networking, wallet, or mempool code

Risk score

Why this scored 18/100

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