Skip to content

Commit

Permalink
Poly-commitment: remove prover_plms_to_verif_evals as unused
Browse files Browse the repository at this point in the history
Even in Mina it is unused.
  • Loading branch information
dannywillems committed Oct 14, 2024
1 parent 1834bba commit 35924a2
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions poly-commitment/src/ipa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,44 +1028,6 @@ impl<G: CommitmentCurve> SRS<G> {
sg: g0,
}
}

/// This function is a debugging helper.
pub fn prover_polynomials_to_verifier_evaluations<D: EvaluationDomain<G::ScalarField>>(
&self,
plnms: PolynomialsToCombine<G, D>,
elm: &[G::ScalarField], // vector of evaluation points
) -> Vec<Evaluation<G>>
where
G::BaseField: PrimeField,
{
plnms
.iter()
.enumerate()
.map(|(i, (poly_or_evals, blinders))| {
let poly = match poly_or_evals {
DensePolynomialOrEvaluations::DensePolynomial(poly) => (*poly).clone(),
DensePolynomialOrEvaluations::Evaluations(evals, _) => {
(*evals).clone().interpolate()
}
};
let chunked_polynomial = poly.to_chunked_polynomial(blinders.len(), self.g.len());
let chunked_commitment = { self.commit_non_hiding(&poly, blinders.len()) };
let masked_commitment = match self.mask_custom(chunked_commitment, blinders) {
Ok(comm) => comm,
Err(err) => panic!("Error at index {i}: {err}"),
};
let chunked_evals = elm
.iter()
.map(|elm| chunked_polynomial.evaluate_chunks(*elm))
.collect();
Evaluation {
commitment: masked_commitment.commitment,

evaluations: chunked_evals,
}
})
.collect()
}
}

#[serde_as]
Expand Down

0 comments on commit 35924a2

Please sign in to comment.