proof-systems icon indicating copy to clipboard operation
proof-systems copied to clipboard

Chuncked evaluations should use a strong type

Open mimoo opened this issue 3 years ago • 0 comments

In utils/src/chunked_polynomial.rs, the evaluate_chunks function returns a vector of field elements:

impl<F: Field> ChunkedPolynomial<F> {
    /// This function evaluates polynomial in chunks.
    pub fn evaluate_chunks(&self, elm: F) -> Vec<F> {
        let mut res: Vec<F> = vec![];
        for poly in self.polys.iter() {
            let eval = poly.evaluate(&elm);
            res.push(eval);
        }
        res
    }

It should return a strong type, perhaps a ChunkedEvaluations(Vec<F>)

After this, we'll have a type for chunked polynomials, evaluations, but we'll still miss one for chunked commitments!

mimoo avatar Jun 29 '22 19:06 mimoo