Repository navigation
fuzz: add proof_decode target for borsh/serde-decoded proofs - #977
Open
citizen-stig wants to merge 1 commit into
Open
citizen-stig wants to merge 1 commit into
citizen-stig wants to merge 1 commit into
Conversation
Untrusted proof bytes are how a stateless verifier receives proofs, but the fuzz build compiled neither decoder. Enable nomt-core's `borsh` and `serde` features and add a target that decodes a `PathProof`, `MultiProof` or `Witness` (borsh, or serde via bincode) from raw bytes or from a byte-edited honest encoding, then verifies it as `examples/witness_verification` does. Witness reads/writes/paths and multi-proof ops can also be edited before encoding, so `verify_update` and `verify_multi_proof_update` see unsorted, duplicated and out-of-scope ops for the first time. Oracles: decoding never panics and re-encodes to the same bytes; an unedited honest proof verifies and yields the model's updated root; anything a decoded proof confirms, and any root an update returns, matches a reference trie. On master this finds the decoded `TriePosition` depth > 256 panic in seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wb3qFADTLbzKssR5mn8LH
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.
Untrusted proof bytes are how a stateless verifier receives proofs, but the fuzz build compiled neither decoder. Enable nomt-core's
borshandserdefeatures and add a target that decodes aPathProof,MultiProoforWitness(borsh, or serde via bincode) from raw bytes or from a byte-edited honest encoding, then verifies it asexamples/witness_verificationdoes.Witness reads/writes/paths and multi-proof ops can also be edited before encoding, so
verify_updateandverify_multi_proof_updatesee unsorted, duplicated and out-of-scope ops for the first time.Oracles: decoding never panics and re-encodes to the same bytes; an unedited honest proof verifies and yields the model's updated root; anything a decoded proof confirms, and any root an update returns, matches a reference trie.
On master this finds the decoded
TriePositiondepth > 256 panic in seconds.