pub struct ProverIndex<G: KimchiCurve, OpeningProof: OpenProof<G>> {
pub cs: Arc<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: Arc<LazyCache<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: Arc<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: Arc<LazyCache<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(
&mut self,
witness: &[DensePolynomial<F>; 15],
public: &DensePolynomial<F>,
) -> bool
pub fn verify_generic( &mut 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>,
lazy_mode: bool,
) -> Self
pub fn create( cs: ConstraintSystem<G::ScalarField>, endo_q: G::ScalarField, srs: Arc<OpeningProof::SRS>, lazy_mode: bool, ) -> 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>
impl<G: Clone + KimchiCurve, OpeningProof: Clone + OpenProof<G>> Clone for ProverIndex<G, OpeningProof>
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