barretenberg icon indicating copy to clipboard operation
barretenberg copied to clipboard

ECCVM: Make ProverPolynomials/ProvingKey model consistent with rest of codebase

Open ledwards2225 opened this issue 10 months ago • 0 comments

In the ECCVM, the ProverPolynomials constructor (from a builder) creates all polynomials directly, with the exception of z_perm and z_lookup_inverses. The ProvingKey constructor (also from a builder) creates all polynomials aside from witness polynomials. (Lot of duplicated work there). We construct both then share all unshifted polynomials from the ProverPolynomials to the ProvingKey. We then somewhat arbitrarily use polys from either the key or the prover_polynomials do perform operations in the pre-sumcheck rounds. Since the polys are shared, it doesn't matter which we use. (Note: this is misleading and recently led to some confusion where we thought certain polynomials were not being set so we were confused why tests were passing at all).

At the minimum we need to update the code so that the ProverPolynomials/ProvingKey are not redundantly constructing polynomials. We should also update the model to better reflect the usage of these two containers in the other proving systems and possible reconsider how we use the two containers in general.

ledwards2225 avatar Apr 10 '24 22:04 ledwards2225