Skip to content

test: add fuzz testing + replace get_* with try_get_* to avoid panics#165

Merged
matthias-wright merged 8 commits intomainfrom
m/fuzz-testing
Apr 24, 2026
Merged

test: add fuzz testing + replace get_* with try_get_* to avoid panics#165
matthias-wright merged 8 commits intomainfrom
m/fuzz-testing

Conversation

@matthias-wright
Copy link
Copy Markdown
Collaborator

This adds fuzz testing via cargo-fuzz for three categories:

  • Parser targets: every Read impl in summit-types. Arbitrary bytes must parse to Ok / Err without panicking, and successful decodes roundtrip to byte-identical output.
  • Non-codec targets: ssz_tree_key::parse_key, derive_child_public, SszProof::verify with adversarial inputs.
  • Property-based targets: WithdrawalQueue op-sequence invariants, ExtPrivateKey sign-verify roundtrip, SSZ incremental-update-vs-rebuild root equality, and generate→verify proof roundtrip across all proof kinds.

Also replaces calls to get_u64 (and similar) with try_get_u64 to avoid panics if there aren't enough bytes to fill the type.

@matthias-wright matthias-wright merged commit 83cceac into main Apr 24, 2026
4 checks passed
@matthias-wright matthias-wright deleted the m/fuzz-testing branch April 24, 2026 18:29
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