Struct miden_processor::ProgramInfo
source · pub struct ProgramInfo { /* private fields */ }
Expand description
A program information set consisting of its MAST root and set of kernel procedure roots used for its compilation.
This will be used as public inputs of the proof so we bind its verification to the kernel and root used to execute the program. This way, we extend the correctness of the proof to the security guarantees provided by the kernel. We also allow the user to easily prove the membership of a given kernel procedure for a given proof, without compromising its zero-knowledge properties.
Implementations§
source§impl ProgramInfo
impl ProgramInfo
sourcepub const fn new(program_hash: RpoDigest, kernel: Kernel) -> ProgramInfo
pub const fn new(program_hash: RpoDigest, kernel: Kernel) -> ProgramInfo
Creates a new instance of a program info.
sourcepub const fn program_hash(&self) -> &RpoDigest
pub const fn program_hash(&self) -> &RpoDigest
Returns the program hash computed from its code block root.
sourcepub fn kernel_procedures(&self) -> &[RpoDigest]
pub fn kernel_procedures(&self) -> &[RpoDigest]
Returns the list of procedures of the kernel used during the compilation.
Trait Implementations§
source§impl Clone for ProgramInfo
impl Clone for ProgramInfo
source§fn clone(&self) -> ProgramInfo
fn clone(&self) -> ProgramInfo
Returns a copy 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 moresource§impl Debug for ProgramInfo
impl Debug for ProgramInfo
source§impl Default for ProgramInfo
impl Default for ProgramInfo
source§fn default() -> ProgramInfo
fn default() -> ProgramInfo
Returns the “default value” for a type. Read more
source§impl Deserializable for ProgramInfo
impl Deserializable for ProgramInfo
source§fn read_from<R>(source: &mut R) -> Result<ProgramInfo, DeserializationError>where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<ProgramInfo, DeserializationError>where
R: ByteReader,
Reads a sequence of bytes from the provided
source
, attempts to deserialize these bytes
into Self
, and returns the result. Read moresource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
source§impl From<Program> for ProgramInfo
impl From<Program> for ProgramInfo
source§fn from(program: Program) -> ProgramInfo
fn from(program: Program) -> ProgramInfo
Converts to this type from the input type.
source§impl PartialEq for ProgramInfo
impl PartialEq for ProgramInfo
source§fn eq(&self, other: &ProgramInfo) -> bool
fn eq(&self, other: &ProgramInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serializable for ProgramInfo
impl Serializable for ProgramInfo
source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
Serializes
self
into bytes and writes these bytes into the target
.source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
source§impl ToElements<BaseElement> for ProgramInfo
impl ToElements<BaseElement> for ProgramInfo
fn to_elements(&self) -> Vec<BaseElement>
impl Eq for ProgramInfo
impl StructuralPartialEq for ProgramInfo
Auto Trait Implementations§
impl Freeze for ProgramInfo
impl RefUnwindSafe for ProgramInfo
impl Send for ProgramInfo
impl Sync for ProgramInfo
impl Unpin for ProgramInfo
impl UnwindSafe for ProgramInfo
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