forked from zcash/halo2
-
Notifications
You must be signed in to change notification settings - Fork 131
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
doc: add comments to permutation prover structs #355
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
43cb637
doc: add comments to permutation prover structs
guorong009 d4cb20f
chore: fix the comment
guorong009 d26ae0b
Merge branch 'main' into gr@doc-permutation-prover-structs
guorong009 23ada39
doc: fix the doc of "Committed" struct
guorong009 dc75c79
Merge branch 'main' into gr@doc-permutation-prover-structs
guorong009 e817f27
Merge branch 'main' into gr@doc-permutation-prover-structs
guorong009 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,18 +20,34 @@ use crate::{ | |||||
use halo2_middleware::circuit::Any; | ||||||
use halo2_middleware::poly::Rotation; | ||||||
|
||||||
// TODO: Document a bit these types | ||||||
// https://github.com/privacy-scaling-explorations/halo2/issues/264 | ||||||
|
||||||
/// Single permutation product polynomial, which has been **committed**. | ||||||
/// | ||||||
/// This struct contains two fields: | ||||||
/// - `permutation_product_poly`: A (coefficient-form) polynomial representing the permutation grand product. | ||||||
/// - `permutation_product_blind`: A scalar value used for blinding, in the commitment of the `permutation_product_poly`. | ||||||
/// | ||||||
/// It stores a single `Z_P` in [permutation argument specification](https://zcash.github.io/halo2/design/proving-system/permutation.html#argument-specification). | ||||||
pub(crate) struct CommittedSet<C: CurveAffine> { | ||||||
pub(crate) permutation_product_poly: Polynomial<C::Scalar, Coeff>, | ||||||
permutation_product_blind: Blind<C::Scalar>, | ||||||
} | ||||||
|
||||||
/// Set of permutation product polynomials, which have been **committed**. | ||||||
/// | ||||||
/// This struct is to contain all of the permutation product polynomials([`CommittedSet`]), from a single circuit. | ||||||
/// | ||||||
/// It stores multiple `Z_P` in [permutation argument specification](https://zcash.github.io/halo2/design/proving-system/permutation.html#spanning-a-large-number-of-columns). | ||||||
pub(crate) struct Committed<C: CurveAffine> { | ||||||
pub(crate) sets: Vec<CommittedSet<C>>, | ||||||
} | ||||||
|
||||||
/// Set of permutation product polynomials, which have been **evaluated**. | ||||||
/// | ||||||
/// This struct is, in essence, the same as [`Committed`]. | ||||||
/// | ||||||
/// It indicates that the permutation product polynomials([`Committed`]) have been evaluated in the evaluation domain, and converted to [`Evaluated`](see [`Committed::evaluate`]). | ||||||
/// | ||||||
/// It also indicates that the permuted product polynomials([`Evaluated`]) can be **opened** (see [`Evaluated::open`]). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Good point! |
||||||
pub(crate) struct Evaluated<C: CurveAffine> { | ||||||
constructed: Committed<C>, | ||||||
} | ||||||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding a link the the halo2 specification!