AztecProtocol / barretenberg

Apache License 2.0
144 stars 94 forks source link

BarycentricData: share compile time and run time logic #674

Open ledwards2225 opened 1 year ago

ledwards2225 commented 1 year ago

We need the functionality of BarycentricData for both field and field_t. The former is "literal" i.e. is compatible with constexpr operations, and the former is not. The functions for computing the pre-computable arrays in BarycentricData need to be constexpr and it takes some trickery to share these functions with the non-constexpr setting. Right now everything is more or less duplicated across BarycentricDataCompileTime and BarycentricDataRunTime. There should be a way to share more of the logic.

ledwards2225 commented 12 months ago

I believe this issue can be easily resolved now that key classes like Sumcheck and Zermopmorph are separated into Prover and Verifier classes. I think there should be no need to do barycentyric extension on stdlib types. Could be forgetting something..

lucasxia01 commented 11 months ago

potential subtle bug in sumcheck - verifier needs to believe that round univariate evaluations are actually evaluations of the round univariates. this doesn't come for free - verifier might need to do barycentric extension to check this.