mirror of https://github.com/zcash/halo2.git
Undo unnecessarily complicated negation thing.
This commit is contained in:
parent
c7c5cf4db6
commit
a128d5d9b3
|
@ -286,9 +286,6 @@ impl<C: CurveAffine> Proof<C> {
|
|||
}
|
||||
|
||||
// l_0(X) * (1 - z(X)) = 0
|
||||
// => l_0(X) - l_0(X) z(X) = 0
|
||||
// We negate, so
|
||||
// => l_0(X) z(X) - l_0(X) = 0
|
||||
// TODO: parallelize
|
||||
for coset in permutation_product_cosets.iter() {
|
||||
for h in h_poly.iter_mut() {
|
||||
|
@ -297,10 +294,7 @@ impl<C: CurveAffine> Proof<C> {
|
|||
|
||||
let mut tmp = srs.l0.clone();
|
||||
for (t, c) in tmp.iter_mut().zip(coset.iter()) {
|
||||
*t *= c;
|
||||
}
|
||||
for (t, c) in tmp.iter_mut().zip(srs.l0.iter()) {
|
||||
*t -= c;
|
||||
*t *= &(C::Scalar::one() - c);
|
||||
}
|
||||
|
||||
for (h, e) in h_poly.iter_mut().zip(tmp.into_iter()) {
|
||||
|
|
|
@ -93,8 +93,7 @@ impl<C: CurveAffine> Proof<C> {
|
|||
tmp *= &srs.domain.get_barycentric_weight(); // l_0(x_3)
|
||||
tmp *= &(C::Scalar::one() - &eval); // l_0(X) * (1 - z(X))
|
||||
|
||||
// We negate this (with no effect on the argument) to simplify the prover.
|
||||
h_eval -= &tmp;
|
||||
h_eval += &tmp;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue