Repository navigation
Conversation
The Transcript trait is now positional. append_serde takes no label, and challenge_scalar takes a Challenge role instead of a label. Each role states how many challenge values let a false claim through (bad_values) and how wide a transcript may draw it (width): beta, alpha and d may be short scalars with losses 2, 4 and 3, the rest full width. Alpha's loss covers gamma, which shares the last alpha's squeeze run. A transcript can then size short draws from Dory's own soundness facts instead of inferring them from labels or from draw position. The trait drops append_bytes, append_field, append_group and reset, which Dory never called. Blake2bTranscript absorbs messages unlabeled, so its proofs change; it still draws every challenge at full width. tests/arkworks/draw_schedule.rs pins the draw order and the absorbs between draws in both modes, checks each squeeze run's loss against its bad values, and proves and verifies with short draws.
Dory absorbs only the prover's messages, not the commitment, the evaluation, the point, or the nu/sigma split. Say so prominently in the transcript module and trait docs, in the prove and verify docs, and in the README, and make the README example absorb the statement on both sides. Also note that the prover panics on a zero beta, alpha or gamma, beside the verifier's rejection. No change to transcript bytes.
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.
Closes #32.
Summary
The
Transcripttrait becomes positional:append_serdetakes no label.challenge_scalartakes aChallengerole instead of a label.bad_values()) and how wide a transcript may draw it (width()). β, α and d may be short scalars, with losses 2, 4 and 3. The others are full width.A transcript can then size short draws from Dory's own soundness facts, rather than inferring them from labels or from draw position. Issue #32 has the reasoning behind the numbers.
Changes
src/primitives/transcript.rs:Challenge,ChallengeWidthandTranscriptScalar;append_bytes,append_field,append_groupandresetfrom the trait, since Dory never called them.src/evaluation_proof.rs,src/reduce_and_fold.rs: drop labels and pass roles. The draw logic is unchanged.src/backends/arkworks/blake2b_transcript.rs: absorbs each message as au64LE length and then its bytes, with no label. Challenges are drawn as before, at full width.new,resetand an unlabeledappend_bytesstay as inherent methods. New tests check that the role is not absorbed and that back-to-back draws differ.tests/arkworks/draw_schedule.rs(new): records the prover's and verifier's transcript calls on real proofs, at shapes (nu, sigma) = (1,1), (1,2), (2,2), (2,3) and (3,3), in both modes. It checks that:lossis at least the sum of the run'sbad_values;Shortwidths proves and verifies.tests/arkworks/zk.rs: the transcript replay helper is updated.transcriptmodule and trait docs, theproveandverifydocs, and the README now warn that Dory does not absorb the commitment, the evaluation, the point, ornu/sigma, so callers must absorb them before proving or verifying. The README example now does this on both sides. TheChallengeWidth::Shortdocs also say that the prover panics on a zeroβ,αorγ, while the verifier rejects it. Transcript bytes are unchanged.CHANGELOG.md: an "Unreleased" entry.Compatibility
This is a breaking change, for 0.5.0:
Transcriptimplementations need mechanical edits.Blake2bTranscriptproofs differ from 0.4.2, because labels are no longer absorbed.I checked the matching adapter change in Jolt (
jolt-dory) against this branch, with Jolt's dory-pcs dependency pointed at it. Its 47 tests pass, and its transcript bytes are identical to those under 0.4.2 for 2 to 6 variables in transparent mode.Testing
cargo fmt --check.cargo clippy --all-targets -D warnings, for featuresbackends,parallel,cache,disk-persistence, the same withzk, and with--no-default-features.cargo doc --all-features -D warnings.cargo nextest run: 90 of 90 pass with the transparent features, and 148 of 148 withzk.Plain
cargo testwith thecachefeature fails, on this branch and on 0.4.2 alike:tests/arkworks/cache.rsfills the global prepared-point cache with random points, and later tests in the same process use them. This is separate from #24, which is about torn setup files. CI uses nextest, so it is unaffected.The soundness argument for the widths (issue #32) is a paper argument. The tests pin the draw schedule and the widths, not the bound itself. A review of the span table in
Challenge::bad_valuesis the most useful check.🤖 Generated with Claude Code