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

feat: implement proof verification #205

Merged
merged 11 commits into from
Dec 20, 2023
Merged

Conversation

chokobole
Copy link
Contributor

@chokobole chokobole commented Dec 18, 2023

Description

This PR implements proof verification verify_proof() part. This doesn't include pairing part which involves evaluating expression.

Plus, it includes some optimizaitons.

  • ConstraintSystem::ComputeDegree() and ConstraintSystem::ComputeBlindingFactors() by caching.
  • UnivariateEvaluationDomain::GetElements().
  • Parallelize Ring::SumOfProducts()

@chokobole chokobole force-pushed the feat/implement-proof-verification branch 2 times, most recently from 22dd3c9 to 4db2822 Compare December 18, 2023 08:00
`kNumCoeffs` is not a number for domain dimension!
Since we generally don't support APIs for iterator and our
parallelization api doens't suppport for iterator, I removed this APIs.
Plus, our code doesn't depend on it, either.

But if I use it everywhere, unittests are failed because of timeout!
@chokobole chokobole force-pushed the feat/implement-proof-verification branch from 4db2822 to 05de4d1 Compare December 19, 2023 14:17
@chokobole chokobole force-pushed the feat/implement-proof-verification branch 2 times, most recently from 20d11ed to 8982337 Compare December 19, 2023 23:58
What `halo2::Verifier` does is some validation done from halo2
`verify_proof` function and read proof using `halo2::ProofReader`.

See
[verify_proof()](https://github.com/kroma-network/halo2/blob/7d0a36990452c8e7ebd600de258420781a9b7917/halo2_proofs/src/plonk/verifier.rs#L41-L70).
Note that this doesn't include pairing part yet.
@chokobole chokobole force-pushed the feat/implement-proof-verification branch from 8982337 to 295e50c Compare December 20, 2023 05:33
Copy link
Contributor

@dongchangYoo dongchangYoo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Insun35 Insun35 left a comment

Choose a reason for hiding this comment

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

LGTM

@chokobole chokobole merged commit a12e82d into main Dec 20, 2023
3 checks passed
@chokobole chokobole deleted the feat/implement-proof-verification branch December 20, 2023 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants