|
#ifdef DEBUG |
|
polynomial<FieldT> g = h_and_g.second; |
|
FieldT actual_sum; |
|
if (this->field_subset_type_ == affine_subspace_type) { |
|
/* The second component is actually g + sum * x^{H_size-1}, but |
|
we immediately remove its highest degree term */ |
|
actual_sum = g[this->summation_domain_size_-1]; |
|
g.set_degree(this->summation_domain_size_-2, true); |
|
} else if (this->field_subset_type_ == multiplicative_coset_type) { |
|
/* The second component is actually x*g + sum, but |
|
we immediately remove its lowest degree term */ |
|
actual_sum = g[0]; |
|
g.remove_term(0); |
|
} |
|
#endif // DEBUG |
Here, actual_sum should be g[0] * this->summation_domain_size instead of g[0].
Please see https://github.com/arkworks-rs/bcs/blob/2ddd1db3838cbf393a8d8d7eafe6a004aa584c61/sumcheck/src/util.rs#L16-L27 for a possible fix
libiop/libiop/protocols/encoded/sumcheck/sumcheck.tcc
Lines 367 to 381 in a2ed2ec
Here,
actual_sumshould beg[0] * this->summation_domain_sizeinstead ofg[0].Please see https://github.com/arkworks-rs/bcs/blob/2ddd1db3838cbf393a8d8d7eafe6a004aa584c61/sumcheck/src/util.rs#L16-L27 for a possible fix