#36129 fuzz: reset chainman after external block imports
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36129 fuzz: reset chainman after external block imports | Ready | 0 | Crickets | 0 + 23 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
This pull request resets and re-initializes the chainstate manager after each iteration of the `load_external_block_file` fuzz target. It also disables unused networking setup to prevent `PeerManager` dangling references and resets the deterministic random number generator seed.
Problem: `LoadExternalBlockFile()` adds headers to the block index even when validation fails, contaminating static global state across fuzz iterations and causing order-dependent corpus coverage and non-reproducible fuzz crashes.
Reviewability
Ready
Nothing known that would invalidate a review now.
Agreement
Crickets
no substantive comment either way
Thread notes: maflcko asked an inline question about using a dirty-guard for performance, which HowHsu answered by noting the difficulty of tracking all order-dependent mutated state.
Objections, suggestions, and questions: none recorded.
Participants:
- maflcko (member, question, 1 statements 2026-09-01 to 2026-09-01): asked whether a dirty-guard would make execution faster
Files
25 lines under test/bench/ci.
- src/test/fuzz/load_external_block_file.cpp +23/-2
Card
The short text the ranking pass compares across PRs.
This PR resets the chainstate manager after each input in the `load_external_block_file` fuzz target. It solves an issue where partial imports pollute global chainstate, causing fuzzer corpus execution to be order-dependent. Deterministic test runs verify that all 930 existing corpus inputs now execute consistently in randomized order. Review is active and ready, with only a minor performance discussion on dirty checking raised so far.
Data
thread read through 2026-09-03 (2 statements), head eb3c6f296d
Discussion read under schema 1 rules: suggestions and questions may be missing, and an objection may combine several harms (schema history).
labels: Fuzzing · draft
Categories
Test infrastructure
P3 · bug fix
Fixes state contamination across fuzz iterations that causes non-reproducible fuzz crashes and order-dependent coverage in the `load_external_block_file` target. While fixing flaky harness behavior is a key priority for test infrastructure, the impact is isolated to a single fuzz target.
Membership: Touches src/test/fuzz/load_external_block_file.cpp and carries the Fuzzing label.
Factors: security/stability 1, bug 1, performance 0, user value 0, leverage 0