Skip to content

Convert delete_nonreduced_fuzz_inputs.sh to rust#269

Merged
maflcko merged 1 commit intobitcoin-core:mainfrom
ekzyis:rust-delete-nonreduced-fuzz-inputs
Mar 30, 2026
Merged

Convert delete_nonreduced_fuzz_inputs.sh to rust#269
maflcko merged 1 commit intobitcoin-core:mainfrom
ekzyis:rust-delete-nonreduced-fuzz-inputs

Conversation

@ekzyis
Copy link
Copy Markdown
Contributor

@ekzyis ekzyis commented Mar 29, 2026

This converts the existing bash script to rust as suggested in #268 (comment).

Also updated README and added this to the documentation in the script:

Also, it's recommended to run the script twice to ensure that the results are "somewhat" reproducible.

How I tested this:

  1. Setup ubuntu 24.04 vm with virt-manager and 8GiB allocated memory on NixOS
  2. Run these commands:
$ git clone --branch rust-delete-nonreduced-fuzz-inputs https://github.com/ekzyis/qa-assets
$ cp -r qa-assets/delete-nonreduced-fuzz-inputs .
$ cd delete-nonreduced-fuzz-inputs
$ sudo apt install cargo
$ sudo cargo run -Znext-lockfile-bump
  1. Listen to computer sounds for over 1 hour
  2. Check if expected git commits have been created

@ekzyis ekzyis marked this pull request as draft March 29, 2026 15:51
@ekzyis ekzyis force-pushed the rust-delete-nonreduced-fuzz-inputs branch from 0afbcd4 to 417d912 Compare March 30, 2026 00:58
@ekzyis ekzyis force-pushed the rust-delete-nonreduced-fuzz-inputs branch from 417d912 to fd99a28 Compare March 30, 2026 01:09
@ekzyis
Copy link
Copy Markdown
Contributor Author

ekzyis commented Mar 30, 2026

fd99a28 First successful complete run deleted 6k files and took 1h10min:

$ find all_inputs -type f | wc -l
122591
$ find qa-assets/fuzz_corpora -type f | wc -l
116419
commit aa0c651d8ae39db2e71c0f8a7c7d2af4b7ef648c
Author: delete_nonreduced_inputs script <noreply@noreply.noreply>
Date:   Mon Mar 30 00:44:05 2026 +0000

    Reduced inputs for fuzzer,address,undefined,integer

commit 4b90c7119a1d6eb8b8a300db1c95464d8c02abb8
Author: delete_nonreduced_inputs script <noreply@noreply.noreply>
Date:   Mon Mar 30 00:06:47 2026 +0000

    Reduced inputs for fuzzer

commit 9ddd4d8a1f44e47e6c03c24e29587d82ab73fd59
Author: delete_nonreduced_inputs script <noreply@noreply.noreply>
Date:   Sun Mar 29 23:53:35 2026 +0000

    Reduced inputs for afl-cmin

commit e73b464051a4b1c1a92eb550518da72cdb08ea8d
Author: delete_nonreduced_inputs script <noreply@noreply.noreply>
Date:   Sun Mar 29 23:36:52 2026 +0000

    Delete fuzz inputs

commit bdc226d2037713aac729e047c4e3521f56f45b98
Author: Niklas Gögge <n.goeggi@gmail.com>
Date:   Fri Mar 13 16:44:07 2026 +0100

    Merge pull request #263 from maflcko/main
    
     Delete nonreduced fuzz inputs

Will run again tomorrow, but I think this is ready for review now

@ekzyis ekzyis marked this pull request as ready for review March 30, 2026 01:36
Copy link
Copy Markdown
Contributor

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Thx

Just left some nits, some of which are unrelated, none of which are a blocker.

Going to merge for now, but the nits can be addressed in a follow-up, if they make sense.

@maflcko maflcko merged commit 26fe402 into bitcoin-core:main Mar 30, 2026
1 check passed
@ekzyis ekzyis deleted the rust-delete-nonreduced-fuzz-inputs branch March 30, 2026 11:46
@ekzyis
Copy link
Copy Markdown
Contributor Author

ekzyis commented Mar 30, 2026

Addressed the feedback in #270, thank you for the review and merge!

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.

2 participants