pub struct StateTransition<Da: DaSpec, Address, Root> {
pub initial_state_root: Root,
pub final_state_root: Root,
pub slot_hash: Da::SlotHash,
pub rewarded_address: Address,
pub validity_condition: Da::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: Root
The state of the rollup before the transition
final_state_root: Root
The state of the rollup after the transition
slot_hash: Da::SlotHash
The slot hash of the state transition
rewarded_address: Address
Rewarded address: the account that has produced the transition proof.
validity_condition: Da::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: DaSpec, Address, Root> BorshDeserialize for StateTransition<Da, Address, Root>where
Root: BorshDeserialize,
Da::SlotHash: BorshDeserialize,
Address: BorshDeserialize,
Da::ValidityCondition: BorshDeserialize,
impl<Da: DaSpec, Address, Root> BorshDeserialize for StateTransition<Da, Address, Root>where
Root: BorshDeserialize,
Da::SlotHash: BorshDeserialize,
Address: BorshDeserialize,
Da::ValidityCondition: BorshDeserialize,
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>
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: DaSpec, Address, Root> BorshSerialize for StateTransition<Da, Address, Root>where
Root: BorshSerialize,
Da::SlotHash: BorshSerialize,
Address: BorshSerialize,
Da::ValidityCondition: BorshSerialize,
impl<Da: DaSpec, Address, Root> BorshSerialize for StateTransition<Da, Address, Root>where
Root: BorshSerialize,
Da::SlotHash: BorshSerialize,
Address: BorshSerialize,
Da::ValidityCondition: BorshSerialize,
Source§impl<Da: Clone + DaSpec, Address: Clone, Root: Clone> Clone for StateTransition<Da, Address, Root>
impl<Da: Clone + DaSpec, Address: Clone, Root: Clone> Clone for StateTransition<Da, Address, Root>
Source§fn clone(&self) -> StateTransition<Da, Address, Root>
fn clone(&self) -> StateTransition<Da, Address, Root>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<Da: Debug + DaSpec, Address: Debug, Root: Debug> Debug for StateTransition<Da, Address, Root>
impl<Da: Debug + DaSpec, Address: Debug, Root: Debug> Debug for StateTransition<Da, Address, Root>
Source§impl<'de, Da: DaSpec, Address, Root> Deserialize<'de> for StateTransition<Da, Address, Root>where
Address: Deserialize<'de>,
Root: Deserialize<'de>,
Da::SlotHash: Deserialize<'de>,
Da::ValidityCondition: Deserialize<'de>,
impl<'de, Da: DaSpec, Address, Root> Deserialize<'de> for StateTransition<Da, Address, Root>where
Address: Deserialize<'de>,
Root: Deserialize<'de>,
Da::SlotHash: Deserialize<'de>,
Da::ValidityCondition: 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<Da: PartialEq + DaSpec, Address: PartialEq, Root: PartialEq> PartialEq for StateTransition<Da, Address, Root>
impl<Da: PartialEq + DaSpec, Address: PartialEq, Root: PartialEq> PartialEq for StateTransition<Da, Address, Root>
Source§fn eq(&self, other: &StateTransition<Da, Address, Root>) -> bool
fn eq(&self, other: &StateTransition<Da, Address, Root>) -> bool
self
and other
values to be equal, and is used by ==
.