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 BorshDeserialize for SystemState
impl BorshDeserialize for SystemState
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for SystemState
impl BorshSerialize for SystemState
Source§impl Clone for SystemState
impl Clone for SystemState
Source§fn clone(&self) -> SystemState
fn clone(&self) -> SystemState
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 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§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