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

source

pub fn decode(flat: &mut VecDeque<u32>) -> Result<Self, DecodeError>

Decode a ReceiptClaim from a list of u32’s

source

pub fn encode(&self, flat: &mut Vec<u32>) -> Result<(), PrunedValueError>

Encode a ReceiptClaim to a list of u32’s

Trait Implementations§

source§

impl Clone for ReceiptClaim

source§

fn clone(&self) -> ReceiptClaim

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ReceiptClaim

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ReceiptClaim

source§

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 ReceiptClaim

source§

fn digest<S: Sha256>(&self) -> Digest

Hash the ReceiptClaim to get a digest of the struct.

source§

impl From<ReceiptClaim> for Assumption

source§

fn from(claim: ReceiptClaim) -> Self

Create an unresolved assumption from a ReceiptClaim.

source§

impl Serialize for ReceiptClaim

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<D> Digestible for D
where D: Digestible + ?Sized,

source§

fn digest(&self) -> Digest

Calculate a collision resistant hash for the typed and structured data.

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,