Repository navigation
ci(fuzz): run fast-check fuzz targets on the ChainSafe fuzz platform - #90
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packages the fast-check fuzz targets from #41 as a Docker image for the ChainSafe fuzz platform, so they run continuously as one campaign (
zapi:round-trip).Changes
Dockerfile.fuzz(+.dockerignore): a build stage that downloads Zig 0.16.0 (checksum-verified) and buildstest_fuzz_numeric.nodewithReleaseSafeand-Dcpu=baseline. The runtime stage isnode:24-slimwith the addon, the tests andnode_modules.tests/fuzz/platform/run-fuzz.ts: the entrypoint, which implements the platform's container contract. It re-runs every*.fuzz.test.tsin a loop (100 000 cases per property by default, a fresh random seed each time) until SIGTERM.$FUZZ_FAILURES/failure-<hash>.json, de-duplicated by test name and shrunk counterexample. The file includes the seed and path for replay. Fuzzing then continues.$FUZZ_METRICS/statusis rewritten atomically after each iteration. It reportsexecs_total,execs_per_second,crashes_totalandlast_find_timestamp_seconds. There is no coverage or corpus field, because fast-check is not coverage-guided.$FUZZ_STATE/stats.json..github/workflows/fuzz-image.yml: mirrors lodestar-z'sfuzz-image.yml. Abuild and testjob runs with read-only permissions and smoke-tests the image under the platform's restrictions (non-root uid, read-only rootfs, no capabilities, no network,--init). Publishing is manual (workflow_dispatch): a separatepublishjob, the only one withpackages: write, pushes the exact tested image asmain(run onmain) orbranch-<name>(any other branch), plussha-<short>, and keeps the newest 20 versions. lodestar-z's AFL++-only steps (seed replay,core_pattern, minimize) are omitted; the platform reads none of them.tests/fuzz/README.md: a section on continuous fuzzing.Verified locally (arm64 Docker, platform restrictions)
FATAL a test suite failed to loadand exit 1.The amd64 build and the workflow itself have not run yet; this PR's CI is their first run.
Follow-ups
mainfrom the Actions tab. Then set the GHCR packagezapi-fuzzto public. The platform pulls without credentials.group_vars/fuzzer/vars.ymlin lodestar-ansible-development:🤖 Generated with Claude Code