refactor: replace rolling-hash transcript with spongefish NARG protocol#17
Open
shreyas-londhe wants to merge 3 commits intoa16z:mainfrom
Open
refactor: replace rolling-hash transcript with spongefish NARG protocol#17shreyas-londhe wants to merge 3 commits intoa16z:mainfrom
shreyas-londhe wants to merge 3 commits intoa16z:mainfrom
Conversation
Replace the custom Blake2b rolling-hash transcript with spongefish's duplex-sponge construction. Proofs are now opaque NARG byte strings instead of serialized Proof structs. Key changes: - Add CheckedProverState/CheckedVerifierState with InteractionPattern enforcement for compile-time protocol structure validation - Declare reusable sub-patterns (sigma1, sigma2, reduce round, scalar product) composed via scoped nesting for diagnostic paths - Domain separator binds (sigma, zk) into sponge instance - Remove Proof struct, blake2b transcript, ark_proof, VMVMessage - Add check_eof() to all tests, benches, and examples - Use macros to reduce spongefish codec boilerplate - Pin spongefish to commit 45df37a7 on fork Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 6, 2026
2b1f1eb to
1620bf3
Compare
Replace Blake2b rolling-hash Fiat-Shamir with spongefish duplex-sponge (upstream arkworks-rs/spongefish v0.5.1). Proofs become opaque NARG byte strings. Bind commitment, evaluation, and point as public messages into the sponge state for defense-in-depth Fiat-Shamir domain separation.
Migrate all call sites to upstream ProverState/VerifierState. Remove check_complete() calls (pattern enforcement dropped). Proof extraction is now prover.narg_string().to_vec() directly.
cf0490f to
16364e8
Compare
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
Replace Blake2b rolling-hash Fiat-Shamir transcript with upstream spongefish v0.5.1 duplex-sponge construction. Proofs become opaque NARG byte strings — no separate
Proofstruct.Breaking change: Proof format is incompatible with previous versions.
Core changes
spongefishdependency (arkworks-rs/spongefishtagv0.5.1, features:ark-ec,sha3)ProverTranscript/VerifierTranscripttraits abstracting the sponge APIdomain.rs— domain separator with instance encoding (nu,sigma,zkflag)spongefish_codecs.rs— trait impls mappingProverState/VerifierStateto Dory's transcript traitspublic_messageinto the sponge state for Fiat-Shamir domain separationRemoved
blake2b_transcript.rs,ark_proof.rs,proof.rs,VMVMessageCheckedProverState,CheckedVerifierState,PatternBuilder)Tests & examples
ProverState/VerifierState