pub struct Attestation<Da: DaSpec, StateProof, StateRoot> {
pub initial_state_root: StateRoot,
pub da_block_hash: Da::SlotHash,
pub post_state_root: StateRoot,
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: StateRoot
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: StateRoot
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, StateRoot> BorshDeserialize for Attestation<Da, StateProof, StateRoot>where
StateRoot: BorshDeserialize,
Da::SlotHash: BorshDeserialize,
ProofOfBond<StateProof>: BorshDeserialize,
impl<Da: DaSpec, StateProof, StateRoot> BorshDeserialize for Attestation<Da, StateProof, StateRoot>where
StateRoot: 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, StateRoot> BorshSerialize for Attestation<Da, StateProof, StateRoot>where
StateRoot: BorshSerialize,
Da::SlotHash: BorshSerialize,
ProofOfBond<StateProof>: BorshSerialize,
impl<Da: DaSpec, StateProof, StateRoot> BorshSerialize for Attestation<Da, StateProof, StateRoot>where
StateRoot: BorshSerialize,
Da::SlotHash: BorshSerialize,
ProofOfBond<StateProof>: BorshSerialize,
Source§impl<Da: Clone + DaSpec, StateProof: Clone, StateRoot: Clone> Clone for Attestation<Da, StateProof, StateRoot>
impl<Da: Clone + DaSpec, StateProof: Clone, StateRoot: Clone> Clone for Attestation<Da, StateProof, StateRoot>
Source§fn clone(&self) -> Attestation<Da, StateProof, StateRoot>
fn clone(&self) -> Attestation<Da, StateProof, StateRoot>
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, StateRoot: Debug> Debug for Attestation<Da, StateProof, StateRoot>
impl<Da: Debug + DaSpec, StateProof: Debug, StateRoot: Debug> Debug for Attestation<Da, StateProof, StateRoot>
Source§impl<Da: Default + DaSpec, StateProof: Default, StateRoot: Default> Default for Attestation<Da, StateProof, StateRoot>
impl<Da: Default + DaSpec, StateProof: Default, StateRoot: Default> Default for Attestation<Da, StateProof, StateRoot>
Source§fn default() -> Attestation<Da, StateProof, StateRoot>
fn default() -> Attestation<Da, StateProof, StateRoot>
Returns the “default value” for a type. Read more
Source§impl<'de, Da: DaSpec, StateProof, StateRoot> Deserialize<'de> for Attestation<Da, StateProof, StateRoot>
impl<'de, Da: DaSpec, StateProof, StateRoot> Deserialize<'de> for Attestation<Da, StateProof, StateRoot>
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, StateRoot: PartialEq> PartialEq for Attestation<Da, StateProof, StateRoot>
impl<Da: PartialEq + DaSpec, StateProof: PartialEq, StateRoot: PartialEq> PartialEq for Attestation<Da, StateProof, StateRoot>
Source§fn eq(&self, other: &Attestation<Da, StateProof, StateRoot>) -> bool
fn eq(&self, other: &Attestation<Da, StateProof, StateRoot>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<Da: DaSpec, StateProof, StateRoot> Serialize for Attestation<Da, StateProof, StateRoot>
impl<Da: DaSpec, StateProof, StateRoot> Serialize for Attestation<Da, StateProof, StateRoot>
impl<Da: Eq + DaSpec, StateProof: Eq, StateRoot: Eq> Eq for Attestation<Da, StateProof, StateRoot>
impl<Da: DaSpec, StateProof, StateRoot> StructuralPartialEq for Attestation<Da, StateProof, StateRoot>
Auto Trait Implementations§
impl<Da, StateProof, StateRoot> Freeze for Attestation<Da, StateProof, StateRoot>
impl<Da, StateProof, StateRoot> RefUnwindSafe for Attestation<Da, StateProof, StateRoot>
impl<Da, StateProof, StateRoot> Send for Attestation<Da, StateProof, StateRoot>
impl<Da, StateProof, StateRoot> Sync for Attestation<Da, StateProof, StateRoot>
impl<Da, StateProof, StateRoot> Unpin for Attestation<Da, StateProof, StateRoot>
impl<Da, StateProof, StateRoot> UnwindSafe for Attestation<Da, StateProof, StateRoot>
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