feat(fuzz): add fuzzing harness for LocalChain with CI job - #2239
Open
erickcestari wants to merge 2 commits into
Open
feat(fuzz): add fuzzing harness for LocalChain with CI job#2239erickcestari wants to merge 2 commits into
LocalChain with CI job#2239erickcestari wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2239 +/- ##
==========================================
- Coverage 78.36% 78.31% -0.05%
==========================================
Files 30 30
Lines 5945 5950 +5
Branches 281 283 +2
==========================================
+ Hits 4659 4660 +1
- Misses 1210 1213 +3
- Partials 76 77 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
It's still missing an updated CI, fixing the conflicts and running each target+harness for an |
Member
|
@erickcestari needs rebase |
erickcestari
force-pushed
the
fuzz-bdk
branch
3 times, most recently
from
August 13, 2026 14:32
5b47b5a to
502a20a
Compare
Co-authored-by: Leonardo Lima <oleonardolima@users.noreply.github.com>
Co-authored-by: Leonardo Lima <oleonardolima@users.noreply.github.com>
oleonardolima
force-pushed
the
fuzz-bdk
branch
from
August 17, 2026 14:19
8f4d293 to
f508347
Compare
Member
|
Put |
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.
Description
Adds an initial fuzzing harness for
bdk_chainand a CI job that runs it.Two fuzz targets in a new
fuzz/crate:local_chain_apply_update: builds aLocalChain<BlockHash>and applies random sequences ofapply_update,insert_block,disconnect_from,apply_header(_connected_to), including updates derived from the chain's own tip to hit themerge_chainseq_ptrfast path.local_chain_apply_update_header: fuzzesLocalChain<Header>, exercising placeholder resolution inapply_updateandCheckPoint::entry_itervia a virtual chain of linked headers with random reorgs.After every operation, the harness asserts that a successful op's changeset reconstructs the post-state from the pre-state, a failed op leaves the chain untouched, and chain invariants hold (strictly decreasing heights, genesis present,
is_block_in_chainconsistency).Supports AFL, honggfuzz, and libFuzzer via cargo features. The CI job runs each fuzzer on each target for 5 minutes as a smoke test.
Notes to the reviewers
fuzzcrate is its own workspace (publish = false) so fuzzer deps don't affect the main workspace.Changelog notice
LocalChain(AFL, honggfuzz, libFuzzer) with a CI job.Coverage report
cc @oleonardolima