diff --git a/spartan_parallel/src/scalar/mod.rs b/spartan_parallel/src/scalar/mod.rs index a8a73968..138a2259 100644 --- a/spartan_parallel/src/scalar/mod.rs +++ b/spartan_parallel/src/scalar/mod.rs @@ -13,7 +13,7 @@ use std::{ cmp::Eq, hash::Hash, iter::{Product, Sum}, - ops::{Add, Mul, MulAssign, Neg, Sub}, + ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}, }; use subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption}; use zeroize::Zeroize; @@ -35,6 +35,9 @@ pub trait SpartanExtensionField: + Add + Sub + Mul + + AddAssign + + SubAssign + + MulAssign + Sum + Product + Clone diff --git a/spartan_parallel/src/sumcheck.rs b/spartan_parallel/src/sumcheck.rs index e181fdf2..249b1abd 100644 --- a/spartan_parallel/src/sumcheck.rs +++ b/spartan_parallel/src/sumcheck.rs @@ -155,7 +155,7 @@ impl SumcheckInstanceProof { let len = poly_A.len() / 2; for i in 0..len { // eval 0: bound_func is A(low) - eval_point_0 = eval_point_0 + comb_func(&poly_A[i], &poly_B[i], &poly_C[i]); + eval_point_0 += comb_func(&poly_A[i], &poly_B[i], &poly_C[i]); // eval 2: bound_func is -A(low) + 2*A(high) let poly_A_bound_point = poly_A[len + i] + poly_A[len + i] - poly_A[i];