Repository navigation
test: add fuzz targets and CI for store boundaries - #30
Merged
portlandhodl merged 3 commits intoOct 21, 2026
Merged
Conversation
…criptors Add a cargo-fuzz crate with four targets: changeset persist/load idempotence, corrupt SQLite row decoding, full anchor identity, and descriptor-id validation. Add a Fuzz workflow that builds and lints the fuzz crate and runs each target for 90 seconds on PRs (300 seconds on the weekly schedule).
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.
Summary
Adds a
cargo-fuzzcrate with four targets and a dedicated Fuzz workflow.Targets
changeset_roundtrip: generates mostly-valid change sets, persists them, reloads, re-persists the full snapshot, and asserts persist/load idempotence. Structurally rejected change sets must roll back cleanly.corrupt_rows: starts from a fully populated store and mutatestx,txout,anchor_tx,block,keychain, andnetworkcolumns with arbitrary blobs, integers, and text. Every load must returnOkor a typed error, never panic.anchor_identity: persists anchors for the same block/transaction with different confirmation times and heights and asserts all survive, including stale observations.descriptor_validation: injects multipath/hardened descriptors (and arbitrary bytes) intokeychainand assertsUnsupportedDescriptorrather than a panic.CI
.github/workflows/fuzz.ymlruns all four targets:Verification
cargo test --all-targets/cargo clippy --all-targets -- -D warningscargo +nightly check/clippy --manifest-path fuzz/Cargo.toml --all-targetsDepends on
Stacked on #29; base is
fix/descriptor-id-validation.