-
Notifications
You must be signed in to change notification settings - Fork 141
Remove IPA / Part1 #377
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
Remove IPA / Part1 #377
Changes from all commits
e69386e
ba23a98
ec3ab13
012e5c7
b6f4082
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,21 +30,16 @@ pub(in crate::plonk) struct Permuted<C: CurveAffine> { | |
| compressed_input_expression: Polynomial<C::Scalar, LagrangeCoeff>, | ||
| permuted_input_expression: Polynomial<C::Scalar, LagrangeCoeff>, | ||
| permuted_input_poly: Polynomial<C::Scalar, Coeff>, | ||
| permuted_input_blind: Blind<C::Scalar>, | ||
|
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. Why are the blinders removed? 🤔
Author
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. ditto ( 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. I did some research. If so, we can safely remove all of these Overall, I think it is better to get to know exact reason, before removing this feature from codebase.
Author
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.
Sure, more knowledge is always good. @guorong009, are you talking about changing the function definition from /// This commits to a polynomial using its evaluations over the $2^k$ size
/// evaluation domain. The commitment will be blinded by the blinding factor
/// `r`.
fn commit_lagrange(
&self,
engine: &impl MsmAccel<C>,
poly: &Polynomial<C::ScalarExt, LagrangeCoeff>,
r: Blind<C::ScalarExt>,
) -> C::CurveExt;to ? /// This commits to a polynomial using its evaluations over the $2^k$ size
/// evaluation domain.
fn commit_lagrange(
&self,
engine: &impl MsmAccel<C>,
poly: &Polynomial<C::ScalarExt, LagrangeCoeff>
) -> C::CurveExt;if yes, this needs refactoring in other parts of the code that I think that is better to do it in another PR. 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. Also, 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. I'm looking a bit more into this. I hadn't realized that KZG was completely ignoring blinders. It seems wrong that there is no possibility to blind the witnesses... where is the zk then? @han0110 Could you comment on this? Are we blinding witnesses at some other level, or did we just remove zk? 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. I think we still have zk, by blinding witnesses at other level. In above 2 PRs, they discuss whether/how to remove the 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. I see. If that is the case I'm fine with removing the blinders 👍 |
||
| compressed_table_expression: Polynomial<C::Scalar, LagrangeCoeff>, | ||
| permuted_table_expression: Polynomial<C::Scalar, LagrangeCoeff>, | ||
| permuted_table_poly: Polynomial<C::Scalar, Coeff>, | ||
| permuted_table_blind: Blind<C::Scalar>, | ||
| } | ||
|
|
||
| #[derive(Debug)] | ||
| pub(in crate::plonk) struct Committed<C: CurveAffine> { | ||
| pub(in crate::plonk) permuted_input_poly: Polynomial<C::Scalar, Coeff>, | ||
| permuted_input_blind: Blind<C::Scalar>, | ||
| pub(in crate::plonk) permuted_table_poly: Polynomial<C::Scalar, Coeff>, | ||
| permuted_table_blind: Blind<C::Scalar>, | ||
| pub(in crate::plonk) product_poly: Polynomial<C::Scalar, Coeff>, | ||
| product_blind: Blind<C::Scalar>, | ||
| } | ||
|
|
||
| pub(in crate::plonk) struct Evaluated<C: CurveAffine> { | ||
|
|
@@ -130,15 +125,15 @@ where | |
| let poly = pk.vk.domain.lagrange_to_coeff(values.clone()); | ||
| let blind = Blind(C::Scalar::random(&mut rng)); | ||
| let commitment = params.commit_lagrange(&engine.msm_backend, values, blind); | ||
| (poly, blind, commitment) | ||
| (poly, commitment) | ||
| }; | ||
|
|
||
| // Commit to permuted input expression | ||
| let (permuted_input_poly, permuted_input_blind, permuted_input_commitment_projective) = | ||
| let (permuted_input_poly, permuted_input_commitment_projective) = | ||
| commit_values(&permuted_input_expression); | ||
|
|
||
| // Commit to permuted table expression | ||
| let (permuted_table_poly, permuted_table_blind, permuted_table_commitment_projective) = | ||
| let (permuted_table_poly, permuted_table_commitment_projective) = | ||
| commit_values(&permuted_table_expression); | ||
|
|
||
| let [permuted_input_commitment, permuted_table_commitment] = { | ||
|
|
@@ -163,11 +158,9 @@ where | |
| compressed_input_expression, | ||
| permuted_input_expression, | ||
| permuted_input_poly, | ||
| permuted_input_blind, | ||
| compressed_table_expression, | ||
| permuted_table_expression, | ||
| permuted_table_poly, | ||
| permuted_table_blind, | ||
| }) | ||
| } | ||
|
|
||
|
|
@@ -313,11 +306,8 @@ impl<C: CurveAffine> Permuted<C> { | |
|
|
||
| Ok(Committed::<C> { | ||
| permuted_input_poly: self.permuted_input_poly, | ||
| permuted_input_blind: self.permuted_input_blind, | ||
| permuted_table_poly: self.permuted_table_poly, | ||
| permuted_table_blind: self.permuted_table_blind, | ||
| product_poly: z, | ||
| product_blind, | ||
| }) | ||
| } | ||
| } | ||
|
|
@@ -368,31 +358,26 @@ impl<C: CurveAffine> Evaluated<C> { | |
| .chain(Some(ProverQuery { | ||
| point: *x, | ||
| poly: &self.constructed.product_poly, | ||
| blind: self.constructed.product_blind, | ||
| })) | ||
| // Open lookup input commitments at x | ||
| .chain(Some(ProverQuery { | ||
| point: *x, | ||
| poly: &self.constructed.permuted_input_poly, | ||
| blind: self.constructed.permuted_input_blind, | ||
| })) | ||
| // Open lookup table commitments at x | ||
| .chain(Some(ProverQuery { | ||
| point: *x, | ||
| poly: &self.constructed.permuted_table_poly, | ||
| blind: self.constructed.permuted_table_blind, | ||
| })) | ||
| // Open lookup input commitments at x_inv | ||
| .chain(Some(ProverQuery { | ||
| point: x_inv, | ||
| poly: &self.constructed.permuted_input_poly, | ||
| blind: self.constructed.permuted_input_blind, | ||
| })) | ||
| // Open lookup product commitments at x_next | ||
| .chain(Some(ProverQuery { | ||
| point: x_next, | ||
| poly: &self.constructed.product_poly, | ||
| blind: self.constructed.product_blind, | ||
| })) | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.