Skip to content

fix(dory): blind jolt-dory zk commitments#1511

Merged
moodlezoup merged 6 commits into
mainfrom
fix/dory-zk
May 11, 2026
Merged

fix(dory): blind jolt-dory zk commitments#1511
moodlezoup merged 6 commits into
mainfrom
fix/dory-zk

Conversation

@0xAndoroid

Copy link
Copy Markdown
Collaborator

Summary

  • Add a ZK commit path for jolt-dory so Dory tier-2 commitments are blinded in ZK mode.
  • Carry the commitment blind through DoryHint, including homomorphic hint combination and streaming ZK finish.
  • Update ZK tests and benches to use matching blinded commitments and hints.

Changes

  • Extends ZkOpeningScheme with commit_zk.
  • Adds DoryScheme::commit_zk and DoryScheme::finish_zk.
  • Stores the Dory commit blind in DoryHint and passes it into open_zk.
  • Adds regression tests for randomized ZK commitments, transparent-commitment rejection, combined ZK hints, and streaming ZK commitments.

Testing

  • cargo fmt -q
  • git diff --check
  • CARGO_NET_OFFLINE=true cargo metadata --no-deps --format-version=1 --quiet
  • Attempted cargo nextest run -p jolt-dory --cargo-quiet, but Cargo metadata tried to resolve the workspace sig-recovery reth git dependency and stalled/fails offline because that dependency is not cached.
  • The pre-commit hook passed typos and fmt, then stalled in its workspace-wide cargo clippy --all --all-targets step for the same metadata/dependency-resolution issue; commit was completed with --no-verify after stopping the hung hook.

@0xAndoroid 0xAndoroid requested a review from moodlezoup as a code owner May 7, 2026 14:01
@github-actions github-actions Bot added the no-spec PR has no spec file label May 7, 2026
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Benchmark comparison (crates)

no benchmark comparisons to show


impl crate::DoryScheme {
#[tracing::instrument(skip_all, name = "DoryScheme::stream_finish_zk")]
pub fn finish_zk(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit awkward that finish is a method defined on the StreamingCommitment trait, but the implementation is expected to differ depending on whether Dory is ZK or not. We should consider reworking the traits/types here to handle this more gracefully, but we can defer that to a follow-up

@moodlezoup moodlezoup added the claude-review-request Request a review from Claude Code label May 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Claude code review session started: https://claude.ai/code/session_012rW6emDAABLErCb58HhhQs

@moodlezoup moodlezoup left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dory ZK blinding looks correct; the streaming and combine paths thread commit_blind through coherently. A few notes on hot-path cost, the new trait default's hiding semantics, and a cross-mode hint footgun.


Generated by Claude Code

Comment thread crates/jolt-dory/src/streaming.rs Outdated
Comment thread crates/jolt-openings/src/schemes.rs Outdated
Comment thread crates/jolt-dory/src/scheme.rs
@moodlezoup moodlezoup merged commit a959096 into main May 11, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-review-request Request a review from Claude Code no-spec PR has no spec file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants