Pass aux_lagrange_polys to prover as a slice

This commit is contained in:
therealyingtong 2020-09-18 21:02:28 +08:00 committed by Sean Bowe
parent fd094fccd8
commit c772801f8f
No known key found for this signature in database
GPG key ID: 95684257D8F8B031
2 changed files with 6 additions and 3 deletions

View file

@ -449,7 +449,7 @@ fn test_proving() {
&params, &params,
&srs, &srs,
&circuit, &circuit,
aux_lagrange_polys.clone(), &aux_lagrange_polys.clone(),
) )
.expect("proof generation should not fail"); .expect("proof generation should not fail");

View file

@ -24,7 +24,7 @@ impl<C: CurveAffine> Proof<C> {
params: &Params<C>, params: &Params<C>,
srs: &SRS<C>, srs: &SRS<C>,
circuit: &ConcreteCircuit, circuit: &ConcreteCircuit,
aux_lagrange_polys: Vec<Polynomial<C::Scalar, LagrangeCoeff>>, aux_lagrange_polys: &[Polynomial<C::Scalar, LagrangeCoeff>],
) -> Result<Self, Error> { ) -> Result<Self, Error> {
struct WitnessCollection<F: Field> { struct WitnessCollection<F: Field> {
advice: Vec<Polynomial<F, LagrangeCoeff>>, advice: Vec<Polynomial<F, LagrangeCoeff>>,
@ -143,7 +143,10 @@ impl<C: CurveAffine> Proof<C> {
let aux_polys: Vec<_> = aux_lagrange_polys let aux_polys: Vec<_> = aux_lagrange_polys
.clone() .clone()
.into_iter() .into_iter()
.map(|poly| domain.lagrange_to_coeff(poly)) .map(|poly| {
let lagrange_vec = domain.lagrange_from_vec(poly.to_vec());
domain.lagrange_to_coeff(lagrange_vec)
})
.collect(); .collect();
let aux_cosets: Vec<_> = meta let aux_cosets: Vec<_> = meta