Skip to content

Commit

Permalink
Remove binding from powerquery
Browse files Browse the repository at this point in the history
  • Loading branch information
adria0 committed Oct 18, 2024
1 parent ba23a98 commit 9bf902b
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 26 deletions.
5 changes: 0 additions & 5 deletions halo2_backend/src/plonk/lookup/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,31 +368,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,
}))
}
}
Expand Down
4 changes: 0 additions & 4 deletions halo2_backend/src/plonk/permutation/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ impl<C: CurveAffine> super::ProvingKey<C> {
self.polys.iter().map(move |poly| ProverQuery {
point: *x,
poly,
blind: Blind::default(),
})
}

Expand Down Expand Up @@ -290,12 +289,10 @@ impl<C: CurveAffine> Evaluated<C> {
.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
Expand All @@ -311,7 +308,6 @@ impl<C: CurveAffine> Evaluated<C> {
Some(ProverQuery {
point: x_last,
poly: &set.permutation_product_poly,
blind: set.permutation_product_blind,
})
}),
)
Expand Down
3 changes: 1 addition & 2 deletions halo2_backend/src/plonk/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions halo2_backend/src/plonk/shuffle/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,11 @@ impl<C: CurveAffine> Evaluated<C> {
.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,
}))
}
}
2 changes: 0 additions & 2 deletions halo2_backend/src/plonk/vanishing/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,10 @@ impl<C: CurveAffine> Evaluated<C> {
.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,
}))
}
}
3 changes: 0 additions & 3 deletions halo2_backend/src/poly/multiopen_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 2 additions & 6 deletions halo2_backend/src/poly/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ pub struct ProverQuery<'com, C: CurveAffine> {
pub(crate) point: C::Scalar,
/// Coefficients of polynomial
pub(crate) poly: &'com Polynomial<C::Scalar, Coeff>,
/// Blinding factor of polynomial
pub(crate) blind: Blind<C::Scalar>,
}

impl<'com, C> ProverQuery<'com, C>
Expand All @@ -35,17 +33,16 @@ where
pub fn new(
point: C::Scalar,
poly: &'com Polynomial<C::Scalar, Coeff>,
blind: Blind<C::Scalar>,
_blind: Blind<C::Scalar>,
) -> Self {
ProverQuery { point, poly, blind }
ProverQuery { point, poly }
}
}

#[doc(hidden)]
#[derive(Copy, Clone)]
pub struct PolynomialPointer<'com, C: CurveAffine> {
pub(crate) poly: &'com Polynomial<C::Scalar, Coeff>,
pub(crate) blind: Blind<C::Scalar>,
}

impl<'com, C: CurveAffine> PartialEq for PolynomialPointer<'com, C> {
Expand All @@ -67,7 +64,6 @@ impl<'com, C: CurveAffine> Query<C::Scalar> for ProverQuery<'com, C> {
fn get_commitment(&self) -> Self::Commitment {
PolynomialPointer {
poly: self.poly,
blind: self.blind,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions halo2_proofs/tests/frontend_backend_split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ fn test_mycircuit_full_legacy() {

proof
},
"7b855ed41c161c8aad4dbcec30912c806a1f6d66eb17f9fa2ee8ba20078aedc6",
"78aadfd46b5cc58b90d832ee47e4df57af3dfc28d1457c4ceeb5d0323a72f130",
);
}

Expand Down Expand Up @@ -626,6 +626,6 @@ fn test_mycircuit_full_split() {

proof
},
"7b855ed41c161c8aad4dbcec30912c806a1f6d66eb17f9fa2ee8ba20078aedc6",
"78aadfd46b5cc58b90d832ee47e4df57af3dfc28d1457c4ceeb5d0323a72f130",
);
}

0 comments on commit 9bf902b

Please sign in to comment.