#35809 contrib: add deterministic fuzz coverage mode

full analysis

https://github.com/bitcoin/bitcoin/pull/35809 · HowHsu · +83/-43 in 2 files, 1 commits · labels: Scripts and tools

Goal

  • Let fuzz developers run only individual or combined coverage checks instead of always running both
  • Saves significant time when debugging specific fuzz determinism failures or cross-input state leaks

Adds an optional `coverage_check` CLI argument (`both`, `single`, or `combined`) to `contrib/devtools/deterministic-fuzz-coverage`. This allows fuzz developers to run either only per-input determinism checks or only the combined cross-input run rather than always executing both.

Problem: Running both individual and combined coverage checks in `deterministic-fuzz-coverage` can be very time-consuming when debugging a specific determinism failure or cross-input state leak.

Category: Tools and scripts (#16 of 22)

P4 · new feature

  • P4 because it adds a minor convenience flag to an offline developer script in contrib
  • Saves time for developers diagnosing fuzz coverage nondeterminism
  • Affects only a niche internal developer tool with no impact on core development

P4 because this is a minor convenience feature for an offline developer script in contrib. While it speeds up troubleshooting for developers diagnosing fuzz coverage nondeterminism, it targets a niche internal tool with no broader impact on regular users or core development.

Membership: Modifies contrib/devtools/deterministic-fuzz-coverage/src/main.rs and devtools documentation.

Factors: security/stability 0, bug 0, performance 1, user value 1, leverage 0

Reviewability: Ready

  • Ready for review
  • Clean patch with passing CI and only a trivial unaddressed documentation nit

The patch is clean, CI passes, and only a trivial README nit from Crypt-iQ remains unanswered without blocking approval.

Author status: Active, addressed review feedback on naming; left a minor README documentation nit unaddressed.

Resolved concerns:

  • maflcko suggested using string modes ('both', 'single', 'combined') instead of integer codes, which the author implemented in a push.

Agreement: Strong

  • Strong consensus with multiple approvals and no objections
  • Approved after author switched CLI arguments to string mode (maflcko)
  • Verified by code review and testing (Crypt-iQ, marcofleon)
  • Verified earlier version by testing on instrumented binaries (jeanpablojp)

Strong consensus with an approval and multiple ACKs (maflcko, Crypt-iQ, marcofleon).

maflcko approved after the string enum design was incorporated, and Crypt-iQ and marcofleon provided review/test ACKs with no objections.

  • maflcko approved: 'Seems fine, but would be good to use named args at some point'
  • Crypt-iQ crACKed: 'crACK 754a9e908ff828341d8eee657584b8ebd31f58e3'
  • marcofleon tACKed: 'tACK 754a9e908ff828341d8eee657584b8ebd31f58e3'
  • jeanpablojp tACKed an earlier version on instrumented binaries

Review verdicts (DrahtBot): 2 (+1)

Files

126 lines under test/bench/ci.

  • contrib/devtools/deterministic-fuzz-coverage/src/main.rs +78/-42
  • contrib/devtools/README.md +5/-1

Card

Adds an optional coverage_check argument to the deterministic-fuzz-coverage developer tool, letting users run either individual corpus input checks or the combined run independently. This saves developer time when isolating whether fuzz coverage non-determinism stems from per-input variance or cross-input state leakage. The PR is clean and approved by maflcko with multiple ACKs, needing only merge consideration.

Data

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T16:21, confidence high, input hash 50cd88d3a53b5cd3