Skip to main content

IndexHandle

Enum IndexHandle 

Source
pub enum IndexHandle {
    Owned(Box<ProverIndex<FULL_ROUNDS, Pallas, <OpeningProof<Pallas, FULL_ROUNDS> as OpenProof<Pallas, FULL_ROUNDS>>::SRS>>),
    Mmap(Box<MmapProverIndex<FULL_ROUNDS, Pallas, <OpeningProof<Pallas, FULL_ROUNDS> as OpenProof<Pallas, FULL_ROUNDS>>::SRS>>),
}
Expand description

Fq companion of the Fp-side crate::pasta_fp_plonk_index::IndexHandle — selects between an owned ProverIndex and an MmapProverIndex whose bulk Vec<F> fields point into a mmap’d cache file. Both variants [Deref] to the same &ProverIndex so existing field-access patterns in this file continue to work via auto-deref.

Variants§

§

Owned(Box<ProverIndex<FULL_ROUNDS, Pallas, <OpeningProof<Pallas, FULL_ROUNDS> as OpenProof<Pallas, FULL_ROUNDS>>::SRS>>)

§

Mmap(Box<MmapProverIndex<FULL_ROUNDS, Pallas, <OpeningProof<Pallas, FULL_ROUNDS> as OpenProof<Pallas, FULL_ROUNDS>>::SRS>>)

Methods from Deref<Target = ProverIndex<FULL_ROUNDS, Pallas, <OpeningProof<Pallas, FULL_ROUNDS> as OpenProof<Pallas, FULL_ROUNDS>>::SRS>>§

Source

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

Source

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>

permutation quotient poly contribution computation

§Errors

Will give error if polynomial division fails.

§Panics

Will panic if power of alpha is missing.

Source

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

Source

pub fn perm_aggreg( &self, witness: &[Vec<F>; 15], beta: &F, gamma: &F, rng: &mut (impl RngCore + CryptoRng), ) -> Result<DensePolynomial<F>, ProverError>

permutation aggregation polynomial computation

§Errors

Will give error if permutation result is not correct.

§Panics

Will panic if first element is not 1.

Source

pub fn verifier_index_digest<EFqSponge>(&self) -> <G as AffineRepr>::BaseField
where 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.

Source

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

Source§

type Target = ProverIndex<FULL_ROUNDS, Affine<PallasParameters>, <OpeningProof<Affine<PallasParameters>, FULL_ROUNDS> as OpenProof<Affine<PallasParameters>, FULL_ROUNDS>>::SRS>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V