pub struct RingContext<S: RingSuite> {
pub piop_params: PiopParams<S>,
}Expand description
Lightweight ring proof context.
Contains only the PIOP parameters needed to construct prover and verifier instances from pre-built keys, without the KZG SRS required for key generation.
Cheap to construct from a ring size alone via RingContext::new, or
extractable from a RingSetup via RingSetup::ring_context.
Fields§
§piop_params: PiopParams<S>PIOP parameters.
Implementations§
Source§impl<S: RingSuite> RingContext<S>
impl<S: RingSuite> RingContext<S>
Sourcepub fn max_ring_size(&self) -> usize
pub fn max_ring_size(&self) -> usize
The max ring size this context is able to handle.
Sourcepub fn ring_prover(
&self,
prover_key: RingProverKey<S>,
key_index: usize,
) -> RingProver<S>
pub fn ring_prover( &self, prover_key: RingProverKey<S>, key_index: usize, ) -> RingProver<S>
Create a prover instance for a specific position in the ring.
Sourcepub fn ring_verifier(&self, verifier_key: RingVerifierKey<S>) -> RingVerifier<S>
pub fn ring_verifier(&self, verifier_key: RingVerifierKey<S>) -> RingVerifier<S>
Create a verifier instance from a verifier key.
Sourcepub fn into_ring_prover(
self,
prover_key: RingProverKey<S>,
key_index: usize,
) -> RingProver<S>
pub fn into_ring_prover( self, prover_key: RingProverKey<S>, key_index: usize, ) -> RingProver<S>
Create a prover instance, consuming the context to avoid cloning.
Sourcepub fn into_ring_verifier(
self,
verifier_key: RingVerifierKey<S>,
) -> RingVerifier<S>
pub fn into_ring_verifier( self, verifier_key: RingVerifierKey<S>, ) -> RingVerifier<S>
Create a verifier instance, consuming the context to avoid cloning.
Trait Implementations§
Source§impl<S: Clone + RingSuite> Clone for RingContext<S>
impl<S: Clone + RingSuite> Clone for RingContext<S>
Source§fn clone(&self) -> RingContext<S>
fn clone(&self) -> RingContext<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<S> Freeze for RingContext<S>
impl<S> RefUnwindSafe for RingContext<S>where
<S as Suite>::Affine: Sized,
<<S as Suite>::Affine as AffineRepr>::Config: Sized,
<<S as Suite>::Affine as AffineRepr>::BaseField: Sized + RefUnwindSafe,
impl<S> Send for RingContext<S>
impl<S> Sync for RingContext<S>
impl<S> Unpin for RingContext<S>
impl<S> UnsafeUnpin for RingContext<S>where
<S as Suite>::Affine: Sized,
<<S as Suite>::Affine as AffineRepr>::Config: Sized,
<<S as Suite>::Affine as AffineRepr>::BaseField: Sized + UnsafeUnpin,
impl<S> UnwindSafe for RingContext<S>where
<S as Suite>::Affine: Sized,
<<S as Suite>::Affine as AffineRepr>::Config: Sized,
<<S as Suite>::Affine as AffineRepr>::BaseField: Sized + UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more