Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add range table circuit #154

Merged
merged 11 commits into from
Sep 3, 2024
Merged

add range table circuit #154

merged 11 commits into from
Sep 3, 2024

Conversation

kunxian-xia
Copy link
Collaborator

@kunxian-xia kunxian-xia commented Aug 19, 2024

Fixes #109.

  • add range circuit and unit test
  • add prover for table circuits: create_table_proof.
  • add verifier for table circuits: verify_table_proof.
  • adjust zkvm prover to produce a vector of circuit proofs.
  • adjust zkvm verifier to verify a vector of circuit proofs and check
    • \prod read_evals[i] = \prod write_evals[i]
    • \sum_{i \in opcode circuits} fraction(logup_evals[i]) = \sum_{j \in table circuits} fraction(logup_evals[j])

Copy link
Collaborator

@hero78119 hero78119 left a comment

Choose a reason for hiding this comment

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

A first pass of review and some thoughts of the designs :)

ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/chip_handler/general.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/chip_handler/general.rs Outdated Show resolved Hide resolved
@kunxian-xia kunxian-xia changed the base branch from feat/new_zkvm_design to master August 23, 2024 11:17
@kunxian-xia kunxian-xia force-pushed the feat/range_table_circuit branch from ca8131c to 52baa91 Compare August 23, 2024 11:54
@kunxian-xia kunxian-xia self-assigned this Aug 27, 2024
@hero78119 hero78119 mentioned this pull request Aug 27, 2024
@kunxian-xia kunxian-xia force-pushed the feat/range_table_circuit branch from 52baa91 to e819215 Compare September 2, 2024 11:26
@kunxian-xia kunxian-xia requested a review from chaosma September 2, 2024 12:17
@kunxian-xia
Copy link
Collaborator Author

@hero78119 I also changed the interface of key_gen() in this PR to return proving key instead of verifying key, and added an input parameter for fixed traces.

Copy link
Collaborator

@hero78119 hero78119 left a comment

Choose a reason for hiding this comment

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

The new change looks pretty me 🔥
just left some chore comments.

ceno_zkvm/src/circuit_builder.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/expression.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/expression.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/utils.rs Show resolved Hide resolved
ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/verifier.rs Show resolved Hide resolved
Copy link
Collaborator

@hero78119 hero78119 left a comment

Choose a reason for hiding this comment

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

Except some left over comments, others LGTM!

ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/prover.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/verifier.rs Outdated Show resolved Hide resolved
ceno_zkvm/src/scheme/verifier.rs Outdated Show resolved Hide resolved
@kunxian-xia kunxian-xia merged commit 44a6d3f into master Sep 3, 2024
4 checks passed
hero78119 pushed a commit that referenced this pull request Sep 4, 2024
Fixes #109.

- [x] add range circuit and unit test
- [x] add prover for table circuits: `create_table_proof`.
- [x] add verifier for table circuits: `verify_table_proof`.
hero78119 pushed a commit that referenced this pull request Sep 4, 2024
Fixes #109.

- [x] add range circuit and unit test
- [x] add prover for table circuits: `create_table_proof`.
- [x] add verifier for table circuits: `verify_table_proof`.
@kunxian-xia kunxian-xia deleted the feat/range_table_circuit branch September 4, 2024 13:57
hero78119 pushed a commit that referenced this pull request Sep 30, 2024
Fixes #109.

- [x] add range circuit and unit test
- [x] add prover for table circuits: `create_table_proof`.
- [x] add verifier for table circuits: `verify_table_proof`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

add range table circuit
2 participants