Struct sp1_core::air::PublicValues
source · #[repr(C)]pub struct PublicValues<W, T> {
pub committed_value_digest: [W; 8],
pub deferred_proofs_digest: [T; 8],
pub start_pc: T,
pub next_pc: T,
pub exit_code: T,
pub shard: T,
pub execution_shard: T,
pub previous_init_addr_bits: [T; 32],
pub last_init_addr_bits: [T; 32],
pub previous_finalize_addr_bits: [T; 32],
pub last_finalize_addr_bits: [T; 32],
}Expand description
The PublicValues struct is used to store all of a shard proof’s public values.
Fields§
§committed_value_digest: [W; 8]The hash of all the bytes that the guest program has written to public values.
deferred_proofs_digest: [T; 8]The hash of all deferred proofs that have been witnessed in the VM. It will be rebuilt in recursive verification as the proofs get verified. The hash itself is a rolling poseidon2 hash of each proof+vkey hash and the previous hash which is initially zero.
start_pc: TThe shard’s start program counter.
next_pc: TThe expected start program counter for the next shard.
exit_code: TThe exit code of the program. Only valid if halt has been executed.
shard: TThe shard number.
execution_shard: TThe execution shard number.
previous_init_addr_bits: [T; 32]The bits of the largest address that is witnessed for initialization in the previous shard.
last_init_addr_bits: [T; 32]The largest address that is witnessed for initialization in the current shard.
previous_finalize_addr_bits: [T; 32]The bits of the largest address that is witnessed for finalization in the previous shard.
last_finalize_addr_bits: [T; 32]The bits of the largest address that is witnessed for finalization in the current shard.
Implementations§
source§impl PublicValues<u32, u32>
impl PublicValues<u32, u32>
source§impl<F: PrimeField32> PublicValues<Word<F>, F>
impl<F: PrimeField32> PublicValues<Word<F>, F>
sourcepub fn commit_digest_bytes(&self) -> Vec<u8> ⓘ
pub fn commit_digest_bytes(&self) -> Vec<u8> ⓘ
Returns the commit digest as a vector of little-endian bytes.
Trait Implementations§
source§impl<T: Clone> BorrowMut<PublicValues<Word<T>, T>> for [T]
impl<T: Clone> BorrowMut<PublicValues<Word<T>, T>> for [T]
source§fn borrow_mut(&mut self) -> &mut PublicValues<Word<T>, T>
fn borrow_mut(&mut self) -> &mut PublicValues<Word<T>, T>
source§impl<W: Clone, T: Clone> Clone for PublicValues<W, T>
impl<W: Clone, T: Clone> Clone for PublicValues<W, T>
source§fn clone(&self) -> PublicValues<W, T>
fn clone(&self) -> PublicValues<W, T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<W: Default, T: Default> Default for PublicValues<W, T>
impl<W: Default, T: Default> Default for PublicValues<W, T>
source§fn default() -> PublicValues<W, T>
fn default() -> PublicValues<W, T>
source§impl<'de, W, T> Deserialize<'de> for PublicValues<W, T>where
W: Deserialize<'de>,
T: Deserialize<'de>,
impl<'de, W, T> Deserialize<'de> for PublicValues<W, T>where
W: Deserialize<'de>,
T: Deserialize<'de>,
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<F: AbstractField> From<PublicValues<u32, u32>> for PublicValues<Word<F>, F>
impl<F: AbstractField> From<PublicValues<u32, u32>> for PublicValues<Word<F>, F>
source§impl<W, T> Serialize for PublicValues<W, T>
impl<W, T> Serialize for PublicValues<W, T>
impl<W: Copy, T: Copy> Copy for PublicValues<W, T>
Auto Trait Implementations§
impl<W, T> Freeze for PublicValues<W, T>
impl<W, T> RefUnwindSafe for PublicValues<W, T>where
T: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, T> Send for PublicValues<W, T>
impl<W, T> Sync for PublicValues<W, T>
impl<W, T> Unpin for PublicValues<W, T>
impl<W, T> UnwindSafe for PublicValues<W, T>where
T: UnwindSafe,
W: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more