Struct sov_modules_api::StateTransition
source · pub struct StateTransition<Da, Address>where
Da: DaSpec,{
pub initial_state_root: [u8; 32],
pub final_state_root: [u8; 32],
pub slot_hash: <Da as DaSpec>::SlotHash,
pub rewarded_address: Address,
pub validity_condition: <Da as DaSpec>::ValidityCondition,
}
Expand description
The public output of a SNARK proof in Sovereign, this struct makes a claim that
the state of the rollup has transitioned from initial_state_root
to final_state_root
if and only if the condition validity_condition
is satisfied.
The period of time covered by a state transition proof may be a single slot, or a range of slots on the DA layer.
Fields§
§initial_state_root: [u8; 32]
The state of the rollup before the transition
final_state_root: [u8; 32]
The state of the rollup after the transition
slot_hash: <Da as DaSpec>::SlotHash
The slot hash of the state transition
rewarded_address: Address
Rewarded address: the account that has produced the transition proof.
validity_condition: <Da as DaSpec>::ValidityCondition
An additional validity condition for the state transition which needs to be checked outside of the zkVM circuit. This typically corresponds to some claim about the DA layer history, such as (X) is a valid block on the DA layer
Trait Implementations§
source§impl<Da, Address> BorshDeserialize for StateTransition<Da, Address>where
Da: DaSpec,
[u8; 32]: BorshDeserialize,
<Da as DaSpec>::SlotHash: BorshDeserialize,
Address: BorshDeserialize,
<Da as DaSpec>::ValidityCondition: BorshDeserialize,
impl<Da, Address> BorshDeserialize for StateTransition<Da, Address>where Da: DaSpec, [u8; 32]: BorshDeserialize, <Da as DaSpec>::SlotHash: BorshDeserialize, Address: BorshDeserialize, <Da as DaSpec>::ValidityCondition: BorshDeserialize,
fn deserialize_reader<R>( reader: &mut R ) -> Result<StateTransition<Da, Address>, Error>where R: Read,
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,
source§impl<Da, Address> BorshSerialize for StateTransition<Da, Address>where
Da: DaSpec,
[u8; 32]: BorshSerialize,
<Da as DaSpec>::SlotHash: BorshSerialize,
Address: BorshSerialize,
<Da as DaSpec>::ValidityCondition: BorshSerialize,
impl<Da, Address> BorshSerialize for StateTransition<Da, Address>where Da: DaSpec, [u8; 32]: BorshSerialize, <Da as DaSpec>::SlotHash: BorshSerialize, Address: BorshSerialize, <Da as DaSpec>::ValidityCondition: BorshSerialize,
source§impl<Da, Address> Clone for StateTransition<Da, Address>where
Da: Clone + DaSpec,
Address: Clone,
<Da as DaSpec>::SlotHash: Clone,
<Da as DaSpec>::ValidityCondition: Clone,
impl<Da, Address> Clone for StateTransition<Da, Address>where Da: Clone + DaSpec, Address: Clone, <Da as DaSpec>::SlotHash: Clone, <Da as DaSpec>::ValidityCondition: Clone,
source§fn clone(&self) -> StateTransition<Da, Address>
fn clone(&self) -> StateTransition<Da, Address>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<Da, Address> Debug for StateTransition<Da, Address>where
Da: Debug + DaSpec,
Address: Debug,
<Da as DaSpec>::SlotHash: Debug,
<Da as DaSpec>::ValidityCondition: Debug,
impl<Da, Address> Debug for StateTransition<Da, Address>where Da: Debug + DaSpec, Address: Debug, <Da as DaSpec>::SlotHash: Debug, <Da as DaSpec>::ValidityCondition: Debug,
source§impl<'de, Da, Address> Deserialize<'de> for StateTransition<Da, Address>where
Da: DaSpec,
Address: Deserialize<'de>,
<Da as DaSpec>::SlotHash: Deserialize<'de>,
<Da as DaSpec>::ValidityCondition: Deserialize<'de>,
impl<'de, Da, Address> Deserialize<'de> for StateTransition<Da, Address>where Da: DaSpec, Address: Deserialize<'de>, <Da as DaSpec>::SlotHash: Deserialize<'de>, <Da as DaSpec>::ValidityCondition: Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<StateTransition<Da, Address>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<StateTransition<Da, Address>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl<Da, Address> PartialEq<StateTransition<Da, Address>> for StateTransition<Da, Address>where
Da: PartialEq<Da> + DaSpec,
Address: PartialEq<Address>,
<Da as DaSpec>::SlotHash: PartialEq<<Da as DaSpec>::SlotHash>,
<Da as DaSpec>::ValidityCondition: PartialEq<<Da as DaSpec>::ValidityCondition>,
impl<Da, Address> PartialEq<StateTransition<Da, Address>> for StateTransition<Da, Address>where Da: PartialEq<Da> + DaSpec, Address: PartialEq<Address>, <Da as DaSpec>::SlotHash: PartialEq<<Da as DaSpec>::SlotHash>, <Da as DaSpec>::ValidityCondition: PartialEq<<Da as DaSpec>::ValidityCondition>,
source§fn eq(&self, other: &StateTransition<Da, Address>) -> bool
fn eq(&self, other: &StateTransition<Da, Address>) -> bool
self
and other
values to be equal, and is used
by ==
.