MCPcopy Create free account
hub / github.com/arkworks-rs/poly-commit / open_multi_points

Method open_multi_points

poly-commit/src/streaming_kzg/time.rs:126–137  ·  view source on GitHub ↗

Evaluate a single polynomial at a set of points `eval_points`, and provide a single evaluation proof.

(
        &self,
        polynomial: &[E::ScalarField],
        eval_points: &[E::ScalarField],
    )

Source from the content-addressed store, hash-verified

124
125 /// Evaluate a single polynomial at a set of points `eval_points`, and provide a single evaluation proof.
126 pub fn open_multi_points(
127 &self,
128 polynomial: &[E::ScalarField],
129 eval_points: &[E::ScalarField],
130 ) -> EvaluationProof<E> {
131 // Computing the vanishing polynomial over eval_points
132 let z_poly = vanishing_polynomial(eval_points);
133
134 let f_poly = DensePolynomial::from_coefficients_slice(polynomial);
135 let q_poly = f_poly.div(&z_poly);
136 EvaluationProof(self.commit(&q_poly.coeffs).0)
137 }
138
139 /// Evaluate a set of polynomials at a set of points `eval_points`, and provide a single batched evaluation proof.
140 /// `eval_chal` is the random challenge for batching evaluation proofs across different polynomials.

Callers 2

test_open_multi_pointsFunction · 0.45

Calls 3

vanishing_polynomialFunction · 0.85
EvaluationProofClass · 0.85
commitMethod · 0.45

Tested by 1

test_open_multi_pointsFunction · 0.36