Struct ExecutionProof
pub struct ExecutionProof {
pub proof: Vec<u8>,
pub hash_fn: HashFunction,
pub pc_requests: Vec<PrecompileRequest>,
}Expand description
A proof of correct execution of Miden VM.
The proof contains the STARK proof, the hash function used during proof generation, and a set of precompile requests deferred during proof generation. However, the proof does not contain public inputs needed to verify the proof.
Fields§
§proof: Vec<u8>§hash_fn: HashFunction§pc_requests: Vec<PrecompileRequest>Implementations§
§impl ExecutionProof
impl ExecutionProof
pub const fn new(
proof: Vec<u8>,
hash_fn: HashFunction,
pc_requests: Vec<PrecompileRequest>,
) -> ExecutionProof
pub const fn new( proof: Vec<u8>, hash_fn: HashFunction, pc_requests: Vec<PrecompileRequest>, ) -> ExecutionProof
Creates a new instance of ExecutionProof from the specified STARK proof, hash function, and list of all deferred [PrecompileRequest]s.
pub fn stark_proof(&self) -> &[u8] ⓘ
pub fn stark_proof(&self) -> &[u8] ⓘ
Returns the underlying STARK proof.
pub const fn hash_fn(&self) -> HashFunction
pub const fn hash_fn(&self) -> HashFunction
Returns the hash function used during proof generation process.
pub fn precompile_requests(&self) -> &[PrecompileRequest]
pub fn precompile_requests(&self) -> &[PrecompileRequest]
Returns the list of precompile requests made during the execution of the program.
pub fn security_level(&self) -> u32
pub fn security_level(&self) -> u32
Returns conjectured security level of this proof in bits.
Currently returns a hardcoded 96 bits. Once the security estimator is implemented in Plonky3, this should calculate the actual conjectured security level based on:
- Proof parameters (FRI folding factor, number of queries, etc.)
- Hash function collision resistance
- Field size and extension degree
pub fn from_bytes(source: &[u8]) -> Result<ExecutionProof, DeserializationError>
pub fn from_bytes(source: &[u8]) -> Result<ExecutionProof, DeserializationError>
Reads the source bytes, parsing a new proof instance.
The serialization layout matches the Serializable implementation of ExecutionProof.
pub fn into_parts(self) -> (HashFunction, Vec<u8>, Vec<PrecompileRequest>)
pub fn into_parts(self) -> (HashFunction, Vec<u8>, Vec<PrecompileRequest>)
Returns the hash function, proof bytes, and precompile requests.
§impl ExecutionProof
impl ExecutionProof
pub fn new_dummy() -> ExecutionProof
pub fn new_dummy() -> ExecutionProof
Creates a dummy ExecutionProof for testing purposes only.
A proof created in this way will not be verifiable against any verifier.
Trait Implementations§
§impl Clone for ExecutionProof
impl Clone for ExecutionProof
§fn clone(&self) -> ExecutionProof
fn clone(&self) -> ExecutionProof
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ExecutionProof
impl Debug for ExecutionProof
§impl Deserializable for ExecutionProof
impl Deserializable for ExecutionProof
§fn read_from<R>(source: &mut R) -> Result<ExecutionProof, DeserializationError>where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<ExecutionProof, DeserializationError>where
R: ByteReader,
source, attempts to deserialize these bytes
into Self, and returns the result. Read more§fn min_serialized_size() -> usize
fn min_serialized_size() -> usize
§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
§fn read_from_bytes_with_budget(
bytes: &[u8],
budget: usize,
) -> Result<Self, DeserializationError>
fn read_from_bytes_with_budget( bytes: &[u8], budget: usize, ) -> Result<Self, DeserializationError>
Self from bytes with a byte budget limit. Read more§impl<'de> Deserialize<'de> for ExecutionProof
impl<'de> Deserialize<'de> for ExecutionProof
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionProof, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionProof, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for ExecutionProof
impl PartialEq for ExecutionProof
§impl Serializable for ExecutionProof
impl Serializable for ExecutionProof
§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
self into bytes and writes these bytes into the target.§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
§impl Serialize for ExecutionProof
impl Serialize for ExecutionProof
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for ExecutionProof
impl StructuralPartialEq for ExecutionProof
Auto Trait Implementations§
impl Freeze for ExecutionProof
impl RefUnwindSafe for ExecutionProof
impl Send for ExecutionProof
impl Sync for ExecutionProof
impl Unpin for ExecutionProof
impl UnsafeUnpin for ExecutionProof
impl UnwindSafe for ExecutionProof
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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>
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>
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§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more