mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Add fixed_values to ProvingKey
This commit is contained in:
parent
ae20f75f7a
commit
5d891e029d
3 changed files with 7 additions and 7 deletions
|
|
@ -6,7 +6,7 @@
|
|||
//! [plonk]: https://eprint.iacr.org/2019/953
|
||||
|
||||
use crate::arithmetic::CurveAffine;
|
||||
use crate::poly::{multiopen, Coeff, EvaluationDomain, ExtendedLagrangeCoeff, Polynomial};
|
||||
use crate::poly::{multiopen, Coeff, EvaluationDomain, ExtendedLagrangeCoeff, LagrangeCoeff, Polynomial};
|
||||
use crate::transcript::ChallengeScalar;
|
||||
|
||||
mod circuit;
|
||||
|
|
@ -37,6 +37,7 @@ pub struct ProvingKey<C: CurveAffine> {
|
|||
vk: VerifyingKey<C>,
|
||||
// TODO: get rid of this?
|
||||
l0: Polynomial<C::Scalar, ExtendedLagrangeCoeff>,
|
||||
fixed_values: Vec<Polynomial<C::Scalar, LagrangeCoeff>>,
|
||||
fixed_polys: Vec<Polynomial<C::Scalar, Coeff>>,
|
||||
fixed_cosets: Vec<Polynomial<C::Scalar, ExtendedLagrangeCoeff>>,
|
||||
permutations: Vec<permutation::ProvingKey<C>>,
|
||||
|
|
|
|||
|
|
@ -432,13 +432,11 @@ impl<F: Field> ConstraintSystem<F> {
|
|||
}
|
||||
|
||||
fn query_any_index(&mut self, column: Column<Any>, at: i32) -> usize {
|
||||
let index = match column.column_type() {
|
||||
match column.column_type() {
|
||||
Any::Advice => self.query_advice_index(Column::<Advice>::try_from(column).unwrap(), at),
|
||||
Any::Fixed => self.query_fixed_index(Column::<Fixed>::try_from(column).unwrap(), at),
|
||||
Any::Aux => self.query_aux_index(Column::<Aux>::try_from(column).unwrap(), at),
|
||||
};
|
||||
|
||||
index
|
||||
}
|
||||
}
|
||||
|
||||
/// Query an Any column at a relative position
|
||||
|
|
|
|||
|
|
@ -103,8 +103,8 @@ where
|
|||
|
||||
let fixed_polys: Vec<_> = assembly
|
||||
.fixed
|
||||
.into_iter()
|
||||
.map(|poly| domain.lagrange_to_coeff(poly))
|
||||
.iter()
|
||||
.map(|poly| domain.lagrange_to_coeff(poly.clone()))
|
||||
.collect();
|
||||
|
||||
let fixed_cosets = cs
|
||||
|
|
@ -131,6 +131,7 @@ where
|
|||
cs,
|
||||
},
|
||||
l0,
|
||||
fixed_values: assembly.fixed,
|
||||
fixed_polys,
|
||||
fixed_cosets,
|
||||
permutations: permutation_pks,
|
||||
|
|
|
|||
Loading…
Reference in a new issue