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) -> Self
pub const fn new(program_hash: RpoDigest, kernel: Kernel) -> Self
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 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 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: ByteReader>(
source: &mut R,
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R, ) -> Result<Self, DeserializationError>
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§impl PartialEq for ProgramInfo
impl PartialEq for ProgramInfo
Source§impl Serializable for ProgramInfo
impl Serializable for ProgramInfo
Source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
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 for ProgramInfo
impl ToElements for ProgramInfo
fn to_elements(&self) -> Vec<Felt>
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