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

Merge bitcoin/bitcoin#36068: fuzz: reuse one fuzzed wallet across inputs

Public commit record

What the developer wrote

Authored by merge-script

91/100 · Strong
Merge bitcoin/bitcoin#36068: fuzz: reuse one fuzzed wallet across inputs

fd3b09e8bcb83351c30b37505501c2a9756d907e fuzz: reuse one fuzzed wallet across inputs (brunoerg)
2553b4cd9678f9d7ba78be3573eb3cd095ab3ea6 wallet: add test-only helper to clear in-memory transaction state (brunoerg)

Pull request description:

FuzzedWallet was rebuilt for every input. That imports eight
descriptors, and each address it then hands out costs a BIP32
derivation plus three separate WalletBatch transactions (see
DescriptorScriptPubKeyMan::GetNewDestination) - all paid before the
target reaches the code under test.

This PR changes it to build the wallet once in the target's .init hook and
reset it perinput instead. I benchmarked on my Ubuntu machine without
sanitizers and got a ~6x speedup.

ACKs for top commit:
frankomosh:
reACK fd3b09e8bcb83351c30b37505501c2a9756d907e
maflcko:
re-ACK fd3b09e8bcb83351c30b37505501c2a9756d907e 👕

Tree-SHA512: 73ab582c1a054525ef4c101d4cd14741b4bbf57315db5db8982640ec499d8047701d3ab5e4442b386a55ef65a1bb7ecee2d8e407c749ea1d2ce032b10e75a6bf
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit is a performance improvement for Bitcoin Core's internal fuzz testing (automated randomized testing). It reuses a single test wallet across many fuzz inputs instead of rebuilding it each time, and adds a test-only helper to clear in-memory transaction state. There is no indication this fixes a security vulnerability or affects production wallet behavior.

Recommended action

No security action required. This is a test-only performance optimization. Reviewers may optionally verify that ClearInMemoryTxStateForTest is adequately guarded from production use (it is documented as test-only and requires cs_wallet lock).

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

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