Skip to content

Wrong calculation of actual_sum in univariate sumcheck #51

@tsunrise

Description

@tsunrise

#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions