pub enum IndexHandle {
Owned(Box<ProverIndex<FULL_ROUNDS, Vesta, <OpeningProof<Vesta, FULL_ROUNDS> as OpenProof<Vesta, FULL_ROUNDS>>::SRS>>),
Mmap(Box<MmapProverIndex<FULL_ROUNDS, Vesta, <OpeningProof<Vesta, FULL_ROUNDS> as OpenProof<Vesta, FULL_ROUNDS>>::SRS>>),
}Expand description
Holds a prover index behind one of two backing stores. The enum
variants both [Deref] to the same &ProverIndex, so all existing
.0.cs… / .0.srs… field-access patterns in this file continue to
work via auto-deref. Concretely:
IndexHandle::Ownedis the classic path: a heap-allocatedProverIndexwhoseVec<F>fields are Rust-owned. Populated bycaml_pasta_fp_plonk_index_create/_read.IndexHandle::Mmapwraps anMmapProverIndexwhose bulkVec<F>fields point into an mmap’d cache file. Populated bycaml_pasta_fp_plonk_index_read_cached. Dropping anMmapvariant skips the innerVec<F>s’ destructors (they would otherwise calldeallocon mmap memory — UB) and unmaps the file.
Variants§
Owned(Box<ProverIndex<FULL_ROUNDS, Vesta, <OpeningProof<Vesta, FULL_ROUNDS> as OpenProof<Vesta, FULL_ROUNDS>>::SRS>>)
Mmap(Box<MmapProverIndex<FULL_ROUNDS, Vesta, <OpeningProof<Vesta, FULL_ROUNDS> as OpenProof<Vesta, FULL_ROUNDS>>::SRS>>)
Methods from Deref<Target = ProverIndex<FULL_ROUNDS, Vesta, <OpeningProof<Vesta, FULL_ROUNDS> as OpenProof<Vesta, FULL_ROUNDS>>::SRS>>§
Sourcepub fn verify(
&self,
witness: &[Vec<F>; 15],
public: &[F],
) -> Result<(), GateError>
pub fn verify( &self, witness: &[Vec<F>; 15], public: &[F], ) -> Result<(), GateError>
This function verifies the consistency of the wire assignments (witness) against the constraints
Sourcepub fn perm_quot(
&self,
lagrange: &WitnessOverDomains<F>,
beta: F,
gamma: F,
z: &DensePolynomial<F>,
alphas: impl Iterator<Item = F>,
) -> Result<(Evaluations<F, Radix2EvaluationDomain<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, Radix2EvaluationDomain<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, Radix2EvaluationDomain<F>>
pub fn perm_lnrz( &self, e: &ProofEvaluations<PointEvaluations<F>>, zeta: F, beta: F, gamma: F, alphas: impl Iterator<Item = F>, ) -> Evaluations<F, Radix2EvaluationDomain<F>>
permutation linearization poly contribution computation
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>
Sourcepub fn verifier_index_digest<EFqSponge>(&self) -> <G as AffineRepr>::BaseFieldwhere
EFqSponge: Clone + FqSponge<<G as AffineRepr>::BaseField, G, <G as AffineRepr>::ScalarField, FULL_ROUNDS>,
VerifierIndex<FULL_ROUNDS, G, Srs>: Clone,
pub fn verifier_index_digest<EFqSponge>(&self) -> <G as AffineRepr>::BaseFieldwhere
EFqSponge: Clone + FqSponge<<G as AffineRepr>::BaseField, G, <G as AffineRepr>::ScalarField, FULL_ROUNDS>,
VerifierIndex<FULL_ROUNDS, G, Srs>: Clone,
Retrieve or compute the digest for the corresponding verifier index.
Sourcepub fn verifier_index(&self) -> VerifierIndex<FULL_ROUNDS, G, Srs>where
VerifierIndex<FULL_ROUNDS, G, Srs>: Clone,
pub fn verifier_index(&self) -> VerifierIndex<FULL_ROUNDS, G, Srs>where
VerifierIndex<FULL_ROUNDS, G, Srs>: Clone,
Produces the VerifierIndex from the prover’s ProverIndex.
§Panics
Will panic if srs cannot be in cell.
Trait Implementations§
Source§impl Deref for IndexHandle
impl Deref for IndexHandle
Source§type Target = ProverIndex<FULL_ROUNDS, Affine<VestaParameters>, <OpeningProof<Affine<VestaParameters>, FULL_ROUNDS> as OpenProof<Affine<VestaParameters>, FULL_ROUNDS>>::SRS>
type Target = ProverIndex<FULL_ROUNDS, Affine<VestaParameters>, <OpeningProof<Affine<VestaParameters>, FULL_ROUNDS> as OpenProof<Affine<VestaParameters>, FULL_ROUNDS>>::SRS>
The resulting type after dereferencing.
Auto Trait Implementations§
impl !RefUnwindSafe for IndexHandle
impl !UnwindSafe for IndexHandle
impl Freeze for IndexHandle
impl Send for IndexHandle
impl Sync for IndexHandle
impl Unpin for IndexHandle
impl UnsafeUnpin for IndexHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more