From 9bf902b0e8d49eb11e563a04f8cf5fc15ccba655 Mon Sep 17 00:00:00 2001 From: adria0 Date: Fri, 18 Oct 2024 12:02:44 +0200 Subject: [PATCH] Remove binding from powerquery --- halo2_backend/src/plonk/lookup/prover.rs | 5 ----- halo2_backend/src/plonk/permutation/prover.rs | 4 ---- halo2_backend/src/plonk/prover.rs | 3 +-- halo2_backend/src/plonk/shuffle/prover.rs | 2 -- halo2_backend/src/plonk/vanishing/prover.rs | 2 -- halo2_backend/src/poly/multiopen_test.rs | 3 --- halo2_backend/src/poly/query.rs | 8 ++------ halo2_proofs/tests/frontend_backend_split.rs | 4 ++-- 8 files changed, 5 insertions(+), 26 deletions(-) diff --git a/halo2_backend/src/plonk/lookup/prover.rs b/halo2_backend/src/plonk/lookup/prover.rs index 9f25fe9f13..326e83f7b0 100644 --- a/halo2_backend/src/plonk/lookup/prover.rs +++ b/halo2_backend/src/plonk/lookup/prover.rs @@ -368,31 +368,26 @@ impl Evaluated { .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, })) } } diff --git a/halo2_backend/src/plonk/permutation/prover.rs b/halo2_backend/src/plonk/permutation/prover.rs index 486da63b77..0740af3e10 100644 --- a/halo2_backend/src/plonk/permutation/prover.rs +++ b/halo2_backend/src/plonk/permutation/prover.rs @@ -205,7 +205,6 @@ impl super::ProvingKey { self.polys.iter().map(move |poly| ProverQuery { point: *x, poly, - blind: Blind::default(), }) } @@ -290,12 +289,10 @@ impl Evaluated { .chain(Some(ProverQuery { point: *x, poly: &set.permutation_product_poly, - blind: set.permutation_product_blind, })) .chain(Some(ProverQuery { point: x_next, poly: &set.permutation_product_poly, - blind: set.permutation_product_blind, })) })) // Open it at \omega^{last} x for all but the last set. This rotation is only @@ -311,7 +308,6 @@ impl Evaluated { Some(ProverQuery { point: x_last, poly: &set.permutation_product_poly, - blind: set.permutation_product_blind, }) }), ) diff --git a/halo2_backend/src/plonk/prover.rs b/halo2_backend/src/plonk/prover.rs index 3a0d93eea0..08538d81df 100644 --- a/halo2_backend/src/plonk/prover.rs +++ b/halo2_backend/src/plonk/prover.rs @@ -613,7 +613,6 @@ impl< .map(move |&(column, at)| ProverQuery { point: self.pk.vk.domain.rotate_omega(*x, at), poly: &advice.advice_polys[column.index], - blind: advice.advice_blinds[column.index], }), ) // Permutations @@ -633,7 +632,7 @@ impl< .map(|&(column, at)| ProverQuery { point: self.pk.vk.domain.rotate_omega(*x, at), poly: &self.pk.fixed_polys[column.index], - blind: Blind::default(), + // blind: Blind::default(), }), ) // Copy constraints diff --git a/halo2_backend/src/plonk/shuffle/prover.rs b/halo2_backend/src/plonk/shuffle/prover.rs index cc01a65255..78da3ec56c 100644 --- a/halo2_backend/src/plonk/shuffle/prover.rs +++ b/halo2_backend/src/plonk/shuffle/prover.rs @@ -242,13 +242,11 @@ impl Evaluated { .chain(Some(ProverQuery { point: *x, poly: &self.constructed.product_poly, - blind: self.constructed.product_blind, })) // Open shuffle product commitments at x_next .chain(Some(ProverQuery { point: x_next, poly: &self.constructed.product_poly, - blind: self.constructed.product_blind, })) } } diff --git a/halo2_backend/src/plonk/vanishing/prover.rs b/halo2_backend/src/plonk/vanishing/prover.rs index 96ce797ee4..3a2387da0f 100644 --- a/halo2_backend/src/plonk/vanishing/prover.rs +++ b/halo2_backend/src/plonk/vanishing/prover.rs @@ -195,12 +195,10 @@ impl Evaluated { .chain(Some(ProverQuery { point: *x, poly: &self.h_poly, - blind: self.h_blind, })) .chain(Some(ProverQuery { point: *x, poly: &self.committed.random_poly, - blind: self.committed.random_blind, })) } } diff --git a/halo2_backend/src/poly/multiopen_test.rs b/halo2_backend/src/poly/multiopen_test.rs index bd34c169d9..a2246ac6f9 100644 --- a/halo2_backend/src/poly/multiopen_test.rs +++ b/halo2_backend/src/poly/multiopen_test.rs @@ -204,17 +204,14 @@ mod test { ProverQuery { point: x.get_scalar(), poly: &ax, - blind, }, ProverQuery { point: x.get_scalar(), poly: &bx, - blind, }, ProverQuery { point: y.get_scalar(), poly: &cx, - blind, }, ] .to_vec(); diff --git a/halo2_backend/src/poly/query.rs b/halo2_backend/src/poly/query.rs index 30be4fbec7..e34ce30eaa 100644 --- a/halo2_backend/src/poly/query.rs +++ b/halo2_backend/src/poly/query.rs @@ -23,8 +23,6 @@ pub struct ProverQuery<'com, C: CurveAffine> { pub(crate) point: C::Scalar, /// Coefficients of polynomial pub(crate) poly: &'com Polynomial, - /// Blinding factor of polynomial - pub(crate) blind: Blind, } impl<'com, C> ProverQuery<'com, C> @@ -35,9 +33,9 @@ where pub fn new( point: C::Scalar, poly: &'com Polynomial, - blind: Blind, + _blind: Blind, ) -> Self { - ProverQuery { point, poly, blind } + ProverQuery { point, poly } } } @@ -45,7 +43,6 @@ where #[derive(Copy, Clone)] pub struct PolynomialPointer<'com, C: CurveAffine> { pub(crate) poly: &'com Polynomial, - pub(crate) blind: Blind, } impl<'com, C: CurveAffine> PartialEq for PolynomialPointer<'com, C> { @@ -67,7 +64,6 @@ impl<'com, C: CurveAffine> Query for ProverQuery<'com, C> { fn get_commitment(&self) -> Self::Commitment { PolynomialPointer { poly: self.poly, - blind: self.blind, } } } diff --git a/halo2_proofs/tests/frontend_backend_split.rs b/halo2_proofs/tests/frontend_backend_split.rs index 2599a30aeb..cd8004e0b3 100644 --- a/halo2_proofs/tests/frontend_backend_split.rs +++ b/halo2_proofs/tests/frontend_backend_split.rs @@ -545,7 +545,7 @@ fn test_mycircuit_full_legacy() { proof }, - "7b855ed41c161c8aad4dbcec30912c806a1f6d66eb17f9fa2ee8ba20078aedc6", + "78aadfd46b5cc58b90d832ee47e4df57af3dfc28d1457c4ceeb5d0323a72f130", ); } @@ -626,6 +626,6 @@ fn test_mycircuit_full_split() { proof }, - "7b855ed41c161c8aad4dbcec30912c806a1f6d66eb17f9fa2ee8ba20078aedc6", + "78aadfd46b5cc58b90d832ee47e4df57af3dfc28d1457c4ceeb5d0323a72f130", ); }