Skip to content

fuzz: add proof verification target - #957

Draft
citizen-stig wants to merge 2 commits into
thrumdev:masterfrom
citizen-stig:fuzz/proof-verify
Draft

citizen-stig wants to merge 2 commits into
thrumdev:masterfrom
citizen-stig:fuzz/proof-verify

Conversation

@citizen-stig

@citizen-stig citizen-stig commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #956

What

Adds a proof_verify cargo-fuzz target that exercises nomt-core proof verification. Proofs reach the verifier from untrusted parties, and until now nothing fuzzed this code.

How

  • Builds a reference trie in memory from fuzzer-chosen leaves. Most keys are derived from existing keys and diverge at a chosen bit, so tries get deep (up to 256 levels). The reference root is checked against update::build_trie.
  • Completeness: honest PathProofs and the MultiProof built from them must verify. confirm_value / confirm_nonexistence must match the model. verify_update and verify_multi_proof_update must produce the root of the updated model.
  • Soundness: the proofs are then tampered with: sibling bit flips, inserted or removed siblings, arbitrary terminals, arbitrary depth, and removed, duplicated or swapped paths. Verification must not panic. If a tampered proof still verifies against the true root, it must not confirm a false value or non-existence, and verify_multi_proof_update must not return a wrong root.

Runs entirely in memory, with no database, io_uring or temp directories.

Run

cargo +nightly fuzz run proof_verify -- -max_total_time=600 -fork=8 -ignore_crashes=1 

citizen-stig and others added 2 commits October 22, 2026 10:01
Builds a reference trie in memory and checks that honest path proofs and
multi-proofs verify, confirm values/non-existence correctly and produce the
right root through verify_update. Then tampers with the proofs and requires
that verification never panics and never accepts a false claim.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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