Struct kimchi::prover_index::ProverIndex
source · pub struct ProverIndex<G: KimchiCurve, OpeningProof: OpenProof<G>> {
pub cs: ConstraintSystem<G::ScalarField>,
pub linearization: Linearization<Vec<PolishToken<G::ScalarField, Column, BerkeleyChallengeTerm>>, Column>,
pub powers_of_alpha: Alphas<G::ScalarField>,
pub srs: Arc<OpeningProof::SRS>,
pub max_poly_size: usize,
pub column_evaluations: ColumnEvaluations<G::ScalarField>,
pub verifier_index: Option<VerifierIndex<G, OpeningProof>>,
pub verifier_index_digest: Option<G::BaseField>,
}
Expand description
The index used by the prover
Fields§
§cs: ConstraintSystem<G::ScalarField>
constraints system polynomials
linearization: Linearization<Vec<PolishToken<G::ScalarField, Column, BerkeleyChallengeTerm>>, Column>
The symbolic linearization of our circuit, which can compile to concrete types once certain values are learned in the protocol.
powers_of_alpha: Alphas<G::ScalarField>
The mapping between powers of alpha and constraints
srs: Arc<OpeningProof::SRS>
polynomial commitment keys
max_poly_size: usize
maximal size of polynomial section
column_evaluations: ColumnEvaluations<G::ScalarField>
§verifier_index: Option<VerifierIndex<G, OpeningProof>>
The verifier index corresponding to this prover index
verifier_index_digest: Option<G::BaseField>
The verifier index digest corresponding to this prover index
Implementations§
source§impl<F: PrimeField, G: KimchiCurve<ScalarField = F>, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>
impl<F: PrimeField, G: KimchiCurve<ScalarField = F>, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>
source§impl<F: PrimeField, G: KimchiCurve<ScalarField = F>, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>
impl<F: PrimeField, G: KimchiCurve<ScalarField = F>, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>
sourcepub fn verify_generic(
&self,
witness: &[DensePolynomial<F>; 15],
public: &DensePolynomial<F>
) -> bool
pub fn verify_generic( &self, witness: &[DensePolynomial<F>; 15], public: &DensePolynomial<F> ) -> bool
Function to verify the generic polynomials with a witness.
source§impl<F: PrimeField, G: KimchiCurve<ScalarField = F>, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>
impl<F: PrimeField, G: KimchiCurve<ScalarField = F>, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>
sourcepub fn perm_quot(
&self,
lagrange: &WitnessOverDomains<F>,
beta: F,
gamma: F,
z: &DensePolynomial<F>,
alphas: impl Iterator<Item = F>
) -> Result<(Evaluations<F, D<F>>, DensePolynomial<F>), ProverError>
pub fn perm_quot( &self, lagrange: &WitnessOverDomains<F>, beta: F, gamma: F, z: &DensePolynomial<F>, alphas: impl Iterator<Item = F> ) -> Result<(Evaluations<F, D<F>>, DensePolynomial<F>), ProverError>
sourcepub fn perm_lnrz(
&self,
e: &ProofEvaluations<PointEvaluations<F>>,
zeta: F,
beta: F,
gamma: F,
alphas: impl Iterator<Item = F>
) -> Evaluations<F, D<F>>
pub fn perm_lnrz( &self, e: &ProofEvaluations<PointEvaluations<F>>, zeta: F, beta: F, gamma: F, alphas: impl Iterator<Item = F> ) -> Evaluations<F, D<F>>
permutation linearization poly contribution computation
source§impl<F: PrimeField, G: KimchiCurve<ScalarField = F>, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>
impl<F: PrimeField, G: KimchiCurve<ScalarField = F>, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>
sourcepub fn perm_aggreg(
&self,
witness: &[Vec<F>; 15],
beta: &F,
gamma: &F,
rng: &mut impl RngCore + CryptoRng
) -> Result<DensePolynomial<F>, ProverError>
pub fn perm_aggreg( &self, witness: &[Vec<F>; 15], beta: &F, gamma: &F, rng: &mut impl RngCore + CryptoRng ) -> Result<DensePolynomial<F>, ProverError>
source§impl<G: KimchiCurve, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>where
G::BaseField: PrimeField,
impl<G: KimchiCurve, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>where G::BaseField: PrimeField,
sourcepub fn create(
cs: ConstraintSystem<G::ScalarField>,
endo_q: G::ScalarField,
srs: Arc<OpeningProof::SRS>
) -> Self
pub fn create( cs: ConstraintSystem<G::ScalarField>, endo_q: G::ScalarField, srs: Arc<OpeningProof::SRS> ) -> Self
this function compiles the index from constraints
sourcepub fn compute_verifier_index_digest<EFqSponge: Clone + FqSponge<G::BaseField, G, G::ScalarField>>(
&mut self
) -> G::BaseFieldwhere
VerifierIndex<G, OpeningProof>: Clone,
pub fn compute_verifier_index_digest<EFqSponge: Clone + FqSponge<G::BaseField, G, G::ScalarField>>( &mut self ) -> G::BaseFieldwhere VerifierIndex<G, OpeningProof>: Clone,
Retrieve or compute the digest for the corresponding verifier index. If the digest is not already cached inside the index, store it.
sourcepub fn verifier_index_digest<EFqSponge: Clone + FqSponge<G::BaseField, G, G::ScalarField>>(
&self
) -> G::BaseFieldwhere
VerifierIndex<G, OpeningProof>: Clone,
pub fn verifier_index_digest<EFqSponge: Clone + FqSponge<G::BaseField, G, G::ScalarField>>( &self ) -> G::BaseFieldwhere VerifierIndex<G, OpeningProof>: Clone,
Retrieve or compute the digest for the corresponding verifier index.
source§impl<G: KimchiCurve, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>where
G::BaseField: PrimeField,
impl<G: KimchiCurve, OpeningProof: OpenProof<G>> ProverIndex<G, OpeningProof>where G::BaseField: PrimeField,
sourcepub fn verifier_index(&self) -> VerifierIndex<G, OpeningProof>where
VerifierIndex<G, OpeningProof>: Clone,
pub fn verifier_index(&self) -> VerifierIndex<G, OpeningProof>where VerifierIndex<G, OpeningProof>: Clone,
Produces the VerifierIndex
from the prover’s ProverIndex
.
Panics
Will panic if srs
cannot be in cell
.
Trait Implementations§
source§impl<G: Clone + KimchiCurve, OpeningProof: Clone + OpenProof<G>> Clone for ProverIndex<G, OpeningProof>where
G::ScalarField: Clone,
OpeningProof::SRS: Clone,
G::BaseField: Clone,
impl<G: Clone + KimchiCurve, OpeningProof: Clone + OpenProof<G>> Clone for ProverIndex<G, OpeningProof>where G::ScalarField: Clone, OpeningProof::SRS: Clone, G::BaseField: Clone,
source§fn clone(&self) -> ProverIndex<G, OpeningProof>
fn clone(&self) -> ProverIndex<G, OpeningProof>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more