Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip zero coefficients in
bellman::groth16::prover::eval
The `eval` function inside the Groth16 prover was assuming that any term existing inside a linear combination (even ones with zero coefficients) increased the query densities, meaning that the multiexp later would assume a group element exists in the SRS with respect to that variable. In fact, a group element doesn't exist because a zero coefficient causes the QAP polynomial to be the zero polynomial for that element, and points at infinity are not stored in the proving key for efficiency purposes. This led to `bases` in `multiexp` having too few bases, leading to the `expected more bases from source` error. The prover now skips over zero coefficients as if they did not appear at all in the linear combination, so that it doesn't mistakenly increase the query density and assume that a group element will exist in the SRS. Co-authored-by: ebfull <[email protected]>
- Loading branch information