Persistent fuzzing corpus for lightningdevkit/rust-lightning.
Each subdirectory of rust-lightning/ corresponds to one fuzz target, named
after the target's fuzz/src/bin/<name>_target.rs file with the _target
suffix removed. The contents of each folder are honggfuzz inputs.
Open a pull request adding new corpus inputs to any existing fuzz-target
folder under rust-lightning/. A CI check runs immediately on each PR and
applies the rules below; PRs that violate any of them are closed by the
check. PRs that pass are merged by a nightly automation job.
- Only additions are accepted. Modifications and deletions of existing
files will close the PR. (The nightly minimization PR opened by
github-actions[bot]is exempt — it removes corpus entries that no longer add coverage.) - Every added file must live under an existing directory. PRs that create new top-level folders or new fuzz-target subfolders are closed. (New fuzz-target folders are created by maintainers when rust-lightning gains a new fuzz target.)
- No file may live under a directory whose name starts with
.(e.g..github/). - PRs that conflict with
masterare closed.
Each night, after the PR-processing job has merged any pending submissions, automation:
- Clones the latest
lightningdevkit/rust-lightning. - Builds every fuzz target with the same configuration as
fuzz/ci-fuzz.sh. - Seeds each target's
hfuzz_workspace/<t>_target/input/from this repo'srust-lightning/<t>/. - Runs
cargo hfuzz run <t>_targetwithHFUZZ_RUN_ARGS="-M …"so honggfuzz drops inputs that don't add unique coverage. - Commits the minimized inputs to a fresh branch and opens a pull request. That PR is picked up and merged by the next nightly's PR-processing job.
If the minimization run trips a crash on a corpus input, the nightly job fails loudly so the regression can be triaged. The crashing input is left in place; the cause must be fixed in rust-lightning before nightly will succeed again.
git clone https://github.com/lightningdevkit/ldk-fuzzing-corpus.git
git clone https://github.com/lightningdevkit/rust-lightning.git
cd rust-lightning/fuzz
# (build the fuzz targets per fuzz/README.md, then for each target:)
TARGET=chanmon_consistency
mkdir -p hfuzz_workspace/${TARGET}_target/input
cp ../../ldk-fuzzing-corpus/rust-lightning/${TARGET}/* \
hfuzz_workspace/${TARGET}_target/input/
cargo hfuzz run ${TARGET}_target