Struct risc0_binfmt::SystemState
source · pub struct SystemState {
pub pc: u32,
pub merkle_root: Digest,
}
Expand description
Represents the public state of a segment, needed for continuations and receipt verification.
Fields§
§pc: u32
The program counter.
merkle_root: Digest
The root hash of a merkle tree which confirms the integrity of the memory image.
Implementations§
source§impl SystemState
impl SystemState
sourcepub fn decode(flat: &mut VecDeque<u32>) -> Result<Self, DecodeError>
pub fn decode(flat: &mut VecDeque<u32>) -> Result<Self, DecodeError>
Decode a SystemState struct from the given vector of u32 words. This encoding is used by the zkVM circuit to write is final memory and PC state to the public information in the seal.
sourcepub fn encode(&self, flat: &mut Vec<u32>)
pub fn encode(&self, flat: &mut Vec<u32>)
Encode a SystemState struct to the given vector of u32 words. This encoding is used by the zkVM circuit to write is final memory and PC state to the public information in the seal.
Trait Implementations§
source§impl Clone for SystemState
impl Clone for SystemState
source§fn clone(&self) -> SystemState
fn clone(&self) -> SystemState
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 SystemState
impl Debug for SystemState
source§impl<'de> Deserialize<'de> for SystemState
impl<'de> Deserialize<'de> for SystemState
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 Digestible for SystemState
impl Digestible for SystemState
source§impl PartialEq for SystemState
impl PartialEq for SystemState
source§fn eq(&self, other: &SystemState) -> bool
fn eq(&self, other: &SystemState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SystemState
impl Serialize for SystemState
impl Eq for SystemState
impl StructuralPartialEq for SystemState
Auto Trait Implementations§
impl Freeze for SystemState
impl RefUnwindSafe for SystemState
impl Send for SystemState
impl Sync for SystemState
impl Unpin for SystemState
impl UnwindSafe for SystemState
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