Struct risc0_zkvm::ReceiptClaim
source · pub struct ReceiptClaim {
pub pre: MaybePruned<SystemState>,
pub post: MaybePruned<SystemState>,
pub exit_code: ExitCode,
pub input: Digest,
pub output: MaybePruned<Option<Output>>,
}
Expand description
Public claims about a zkVM guest execution, such as the journal committed to by the guest.
Also includes important information such as the exit code and the starting and ending system state (i.e. the state of memory). ReceiptClaim is a “Merkle-ized struct” supporting partial openings of the underlying fields from a hash commitment to the full structure. Also see MaybePruned.
Fields§
§pre: MaybePruned<SystemState>
The SystemState just before execution has begun.
post: MaybePruned<SystemState>
The SystemState just after execution has completed.
NOTE: In order to avoid extra logic in the rv32im circuit to perform arithmetic on the PC
with carry, the post state PC is recorded as the current PC + 4. Subtract 4 to get the
“actual” final PC of the zkVM at the end of the segment. When the exit code is Halted
or
Paused
, this will be the address of the halt ecall
. When the exit code is
SystemSplit
, this will be the address of the next instruction to be executed.
exit_code: ExitCode
The exit code for the execution.
input: Digest
Input to the guest.
NOTE: This field must be set to the zero Digest because it is not yet cryptographically bound by the RISC Zero proof system; the guest has no way to set the input. It may be possible to use set this field to non-zero values in the future.
output: MaybePruned<Option<Output>>
Output of the guest, including the journal and assumptions set during execution.
Implementations§
source§impl ReceiptClaim
impl ReceiptClaim
Trait Implementations§
source§impl Clone for ReceiptClaim
impl Clone for ReceiptClaim
source§fn clone(&self) -> ReceiptClaim
fn clone(&self) -> ReceiptClaim
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ReceiptClaim
impl Debug for ReceiptClaim
source§impl<'de> Deserialize<'de> for ReceiptClaim
impl<'de> Deserialize<'de> for ReceiptClaim
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>,
source§impl Digestible for ReceiptClaim
impl Digestible for ReceiptClaim
source§impl From<ReceiptClaim> for Assumption
impl From<ReceiptClaim> for Assumption
source§fn from(claim: ReceiptClaim) -> Self
fn from(claim: ReceiptClaim) -> Self
Create an unresolved assumption from a ReceiptClaim.