Struct sov_rollup_interface::optimistic::Attestation
source · pub struct Attestation<Da: DaSpec, StateProof> {
pub initial_state_root: [u8; 32],
pub da_block_hash: Da::SlotHash,
pub post_state_root: [u8; 32],
pub proof_of_bond: ProofOfBond<StateProof>,
}
Expand description
An attestation that a particular DA layer block transitioned the rollup state to some value
Fields§
§initial_state_root: [u8; 32]
The alleged state root before applying the contents of the da block
da_block_hash: Da::SlotHash
The hash of the block in which the transition occurred
post_state_root: [u8; 32]
The alleged post-state root
proof_of_bond: ProofOfBond<StateProof>
A proof that the attester was bonded at some point in time before the attestation is generated
Trait Implementations§
source§impl<Da: DaSpec, StateProof> BorshDeserialize for Attestation<Da, StateProof>where
[u8; 32]: BorshDeserialize,
Da::SlotHash: BorshDeserialize,
ProofOfBond<StateProof>: BorshDeserialize,
impl<Da: DaSpec, StateProof> BorshDeserialize for Attestation<Da, StateProof>where [u8; 32]: BorshDeserialize, Da::SlotHash: BorshDeserialize, ProofOfBond<StateProof>: 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>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,
source§impl<Da: DaSpec, StateProof> BorshSerialize for Attestation<Da, StateProof>where
[u8; 32]: BorshSerialize,
Da::SlotHash: BorshSerialize,
ProofOfBond<StateProof>: BorshSerialize,
impl<Da: DaSpec, StateProof> BorshSerialize for Attestation<Da, StateProof>where [u8; 32]: BorshSerialize, Da::SlotHash: BorshSerialize, ProofOfBond<StateProof>: BorshSerialize,
source§impl<Da: Clone + DaSpec, StateProof: Clone> Clone for Attestation<Da, StateProof>where
Da::SlotHash: Clone,
impl<Da: Clone + DaSpec, StateProof: Clone> Clone for Attestation<Da, StateProof>where Da::SlotHash: Clone,
source§fn clone(&self) -> Attestation<Da, StateProof>
fn clone(&self) -> Attestation<Da, StateProof>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Da: Debug + DaSpec, StateProof: Debug> Debug for Attestation<Da, StateProof>where
Da::SlotHash: Debug,
impl<Da: Debug + DaSpec, StateProof: Debug> Debug for Attestation<Da, StateProof>where Da::SlotHash: Debug,
source§impl<Da: Default + DaSpec, StateProof: Default> Default for Attestation<Da, StateProof>where
Da::SlotHash: Default,
impl<Da: Default + DaSpec, StateProof: Default> Default for Attestation<Da, StateProof>where Da::SlotHash: Default,
source§fn default() -> Attestation<Da, StateProof>
fn default() -> Attestation<Da, StateProof>
Returns the “default value” for a type. Read more
source§impl<'de, Da: DaSpec, StateProof> Deserialize<'de> for Attestation<Da, StateProof>where
StateProof: Deserialize<'de>,
Da::SlotHash: Deserialize<'de>,
impl<'de, Da: DaSpec, StateProof> Deserialize<'de> for Attestation<Da, StateProof>where StateProof: Deserialize<'de>, Da::SlotHash: 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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<Da: PartialEq + DaSpec, StateProof: PartialEq> PartialEq<Attestation<Da, StateProof>> for Attestation<Da, StateProof>where
Da::SlotHash: PartialEq,
impl<Da: PartialEq + DaSpec, StateProof: PartialEq> PartialEq<Attestation<Da, StateProof>> for Attestation<Da, StateProof>where Da::SlotHash: PartialEq,
source§fn eq(&self, other: &Attestation<Da, StateProof>) -> bool
fn eq(&self, other: &Attestation<Da, StateProof>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Da: DaSpec, StateProof> Serialize for Attestation<Da, StateProof>where
StateProof: Serialize,
Da::SlotHash: Serialize,
impl<Da: DaSpec, StateProof> Serialize for Attestation<Da, StateProof>where StateProof: Serialize, Da::SlotHash: Serialize,
impl<Da: Eq + DaSpec, StateProof: Eq> Eq for Attestation<Da, StateProof>where Da::SlotHash: Eq,
impl<Da: DaSpec, StateProof> StructuralEq for Attestation<Da, StateProof>
impl<Da: DaSpec, StateProof> StructuralPartialEq for Attestation<Da, StateProof>
Auto Trait Implementations§
impl<Da, StateProof> RefUnwindSafe for Attestation<Da, StateProof>where StateProof: RefUnwindSafe, <Da as DaSpec>::SlotHash: RefUnwindSafe,
impl<Da, StateProof> Send for Attestation<Da, StateProof>where StateProof: Send,
impl<Da, StateProof> Sync for Attestation<Da, StateProof>where StateProof: Sync,
impl<Da, StateProof> Unpin for Attestation<Da, StateProof>where StateProof: Unpin, <Da as DaSpec>::SlotHash: Unpin,
impl<Da, StateProof> UnwindSafe for Attestation<Da, StateProof>where StateProof: UnwindSafe, <Da as DaSpec>::SlotHash: 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
Mutably borrows from an owned value. Read more