Skip to content

Delete nonreduced fuzz inputs - #221

Merged
dergoegge merged 4 commits into
bitcoin-core:mainfrom
maflcko:main
Mar 27, 2025
Merged

dergoegge merged 4 commits into
bitcoin-core:mainfrom
maflcko:main

Conversation

@maflcko

@maflcko maflcko commented Mar 25, 2025 •

Copy link
Copy Markdown
Contributor

As per the usual process to avoid wasted CI resources and timeouts when CI runs on large and presumed irrelevant inputs.

Normally, deletion of non-reduced fuzz inputs should happen after feature-freeze on the master Bitcoin Core branch, but before branch-off, so that the latest release branch retains mostly valid fuzz inputs.

Previous: #204

To "reproduce"

Install a fresh VM, as explained in the bash script's doc, and run it:

apt update && apt install curl -y
curl -L -O https://raw.githubusercontent.com/bitcoin-core/bitcoin-maintainer-tools/main/delete_nonreduced_fuzz_inputs.sh
bash delete_nonreduced_fuzz_inputs.sh

To "test"

  • Keep an eye on coverage stats, to ensure it doesn't drop
  • Re-run the script, to ensure it is "reproducible" to some extent
  • Anything else you think is important to test or review

CI

CI should pass, except for a lint failure, which should light up on any changes like this pull request, which delete fuzz inputs.

@maflcko

maflcko commented Mar 25, 2025 •

Copy link
Copy Markdown
Contributor Author

Storage device usage (du -sh ./fuzz_corpora/)

5.8G -> 2.7G

Determinism

  • ~125k fuzz input files deleted
git diff --stat origin/main..2b825cd506de7403c69ecf3e8a6f495b8dc1dcad | tail -1
 125400 files changed
  • Cross-diff with a second run of the script: 4k fuzz input files
git -c diff.renameLimit=2007 diff --stat HEAD..2b825cd506de7403c69ecf3e8a6f495b8dc1dcad | tail -1 
 3737 files changed

Coverage

@maflcko

maflcko commented Mar 25, 2025

Copy link
Copy Markdown
Contributor Author

@maflcko

maflcko commented Mar 25, 2025

Copy link
Copy Markdown
Contributor Author

Though, the cross-diff is at a historic low, so the result is one of the most deterministic ones (so far)

@maflcko

maflcko commented Mar 26, 2025

Copy link
Copy Markdown
Contributor Author

This is ready for review, now that CI passed, except for the expected 'lint' failure.

@marcofleon

Copy link
Copy Markdown
Contributor

Reviewing this now. About how long is the script expected to take?

@maflcko

maflcko commented Mar 27, 2025

Copy link
Copy Markdown
Contributor Author

Looking at the commit timestamps, it took around 4 hours, but it could be more or less, depending on your compute, memory and storage.

@marcofleon

Copy link
Copy Markdown
Contributor

Original: https://marcofleon.github.io/coverage/original_fuzz_corpora/
Reduced: https://marcofleon.github.io/coverage/reduced_fuzz_corpora/

Both coverage reports generated on the most commit in master. Looks generally good to me, there was a little drop in function coverage (e.g. chain.cpp, hash.cpp, rpc/server.cpp) but must just be some instability.

Corpora went from 5.7G to 2.7G.

@dergoegge
dergoegge merged commit 12d26e3 into bitcoin-core:main Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants