Skip to content

test: add fuzz targets and CI for store boundaries - #30

Merged
portlandhodl merged 3 commits into
fix/descriptor-id-validationfrom
test/fuzz-store-boundaries
Oct 21, 2026
Merged

portlandhodl merged 3 commits into
fix/descriptor-id-validationfrom
test/fuzz-store-boundaries

Conversation

@portlandhodl

Copy link
Copy Markdown
Collaborator

Summary

Adds a cargo-fuzz crate 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 mutates tx, txout, anchor_tx, block, keychain, and network columns with arbitrary blobs, integers, and text. Every load must return Ok or 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) into keychain and asserts UnsupportedDescriptor rather than a panic.

CI

.github/workflows/fuzz.yml runs all four targets:

  • 90 seconds per target on pull requests and pushes to master.
  • 300 seconds per target on the weekly schedule.
  • Lints and formats the fuzz crate with nightly, builds each target, and uploads artifacts on failure.

Verification

  • cargo test --all-targets / cargo clippy --all-targets -- -D warnings
  • cargo +nightly check/clippy --manifest-path fuzz/Cargo.toml --all-targets
  • Ran every fuzz target locally for 15–20 seconds with no findings.

Depends on

Stacked on #29; base is fix/descriptor-id-validation.

…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).
@portlandhodl
portlandhodl merged commit 05a20f4 into fix/descriptor-id-validation Oct 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant