pub enum SP1Proof {
Core(Vec<ShardProof<CoreSC>>),
Compressed(Box<SP1ReduceProof<InnerSC>>),
Plonk(PlonkBn254Proof),
Groth16(Groth16Bn254Proof),
}
Expand description
A proof generated by the SP1 RISC-V zkVM.
Variants§
Core(Vec<ShardProof<CoreSC>>)
A proof generated by the core proof mode.
The proof size scales linearly with the number of cycles.
Compressed(Box<SP1ReduceProof<InnerSC>>)
A proof generated by the compress proof mode.
The proof size is constant, regardless of the number of cycles.
Plonk(PlonkBn254Proof)
A proof generated by the Plonk proof mode.
Groth16(Groth16Bn254Proof)
A proof generated by the Groth16 proof mode.
Implementations§
Source§impl SP1Proof
impl SP1Proof
pub fn try_as_core(self) -> Option<Vec<ShardProof<CoreSC>>>
pub const fn try_as_core_ref(&self) -> Option<&Vec<ShardProof<CoreSC>>>
pub fn try_as_core_mut(&mut self) -> Option<&mut Vec<ShardProof<CoreSC>>>
pub fn try_as_compressed(self) -> Option<Box<SP1ReduceProof<InnerSC>>>
pub const fn try_as_compressed_ref( &self, ) -> Option<&Box<SP1ReduceProof<InnerSC>>>
pub fn try_as_compressed_mut( &mut self, ) -> Option<&mut Box<SP1ReduceProof<InnerSC>>>
pub fn try_as_plonk(self) -> Option<PlonkBn254Proof>
pub const fn try_as_plonk_ref(&self) -> Option<&PlonkBn254Proof>
pub fn try_as_plonk_mut(&mut self) -> Option<&mut PlonkBn254Proof>
pub fn try_as_groth_16(self) -> Option<Groth16Bn254Proof>
pub const fn try_as_groth_16_ref(&self) -> Option<&Groth16Bn254Proof>
pub fn try_as_groth_16_mut(&mut self) -> Option<&mut Groth16Bn254Proof>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SP1Proof
impl<'de> Deserialize<'de> for SP1Proof
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'_enum> From<&'_enum SP1Proof> for SP1ProofMode
impl<'_enum> From<&'_enum SP1Proof> for SP1ProofMode
Source§fn from(val: &'_enum SP1Proof) -> SP1ProofMode
fn from(val: &'_enum SP1Proof) -> SP1ProofMode
Converts to this type from the input type.
Source§impl From<SP1Proof> for SP1ProofMode
impl From<SP1Proof> for SP1ProofMode
Source§fn from(val: SP1Proof) -> SP1ProofMode
fn from(val: SP1Proof) -> SP1ProofMode
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SP1Proof
impl RefUnwindSafe for SP1Proof
impl Send for SP1Proof
impl Sync for SP1Proof
impl Unpin for SP1Proof
impl UnwindSafe for SP1Proof
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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