|
1 | 1 | # qa-assets
|
2 |
| -Bitcoin Core related blobs used for quality assurance |
| 2 | + |
| 3 | +Bitcoin Core related blobs used for quality assurance. |
| 4 | + |
| 5 | +## Fuzz inputs |
| 6 | + |
| 7 | +`qa-assets/fuzz_seed_corpus` contains one input corpus per fuzz target (one |
| 8 | +folder per target named the same as each target). |
| 9 | + |
| 10 | +### Contributing inputs |
| 11 | + |
| 12 | +*For documentation on how to fuzz Bitcoin Core please see |
| 13 | +[fuzzing.md](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md).* |
| 14 | + |
| 15 | +If you want to contribute fuzz inputs, please "merge" the inputs before |
| 16 | +submitting a pull request. You can use the libFuzzer option `-merge=1` |
| 17 | +(recommended with `-use_value_profile=1`) or the `--m_dir` option of the fuzz |
| 18 | +runner: |
| 19 | +[`test_runner.py`](https://github.com/bitcoin/bitcoin/blob/master/test/fuzz/test_runner.py). |
| 20 | + |
| 21 | +### Pruning inputs |
| 22 | + |
| 23 | +* Over time fuzz engines reduce inputs (produce a smaller input that yields the |
| 24 | + same coverage statistics), which causes our copora to accumulate larger |
| 25 | + non-reduced inputs. |
| 26 | +* Code changes can lead to inputs losing their coverage. |
| 27 | + |
| 28 | +To avoid corpora bloat, stale inputs and potential CI timeouts, we usually |
| 29 | +prune/minimize our copora around the branch-off point using the |
| 30 | +[`delete_nonreduced_fuzz_inputs.sh`](https://raw.githubusercontent.com/bitcoin-core/bitcoin-maintainer-tools/main/delete_nonreduced_fuzz_inputs.sh) |
| 31 | +script (Recommended to run in a fresh VM, see documentation in the script). The |
| 32 | +script is usually run twice to ensure that the results are "somewhat" |
| 33 | +reproducible (e.g. |
| 34 | +https://github.com/bitcoin-core/qa-assets/pull/119#issuecomment-1518019457). |
| 35 | + |
| 36 | +After pruning the corpora, the coverage should not have dropped at all. |
| 37 | + |
| 38 | +### Pulling inputs from oss-fuzz |
| 39 | + |
| 40 | +Use `download_oss_fuzz_inputs.py` to pull fuzz inputs from oss-fuzz. |
0 commit comments