Struct Attestation

Source
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>

Source§

fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>

Source§

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>

Deserialize this instance from a slice of bytes.
Source§

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,

Source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

Source§

fn try_to_vec(&self) -> Result<Vec<u8>, Error>

Serialize this instance into a vector of bytes.
Source§

impl<Da: Clone + DaSpec, StateProof: Clone, StateRoot: Clone> Clone for Attestation<Da, StateProof, StateRoot>
where Da::SlotHash: Clone,

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<Da: Debug + DaSpec, StateProof: Debug, StateRoot: Debug> Debug for Attestation<Da, StateProof, StateRoot>
where Da::SlotHash: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Da: Default + DaSpec, StateProof: Default, StateRoot: Default> Default for Attestation<Da, StateProof, StateRoot>
where Da::SlotHash: Default,

Source§

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>
where StateProof: Deserialize<'de>, StateRoot: Deserialize<'de>, Da::SlotHash: Deserialize<'de>,

Source§

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>
where Da::SlotHash: PartialEq,

Source§

fn eq(&self, other: &Attestation<Da, StateProof, StateRoot>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Da: DaSpec, StateProof, StateRoot> Serialize for Attestation<Da, StateProof, StateRoot>
where StateProof: Serialize, StateRoot: Serialize, Da::SlotHash: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<Da: Eq + DaSpec, StateProof: Eq, StateRoot: Eq> Eq for Attestation<Da, StateProof, StateRoot>
where Da::SlotHash: Eq,

Source§

impl<Da: DaSpec, StateProof, StateRoot> StructuralPartialEq for Attestation<Da, StateProof, StateRoot>

Auto Trait Implementations§

§

impl<Da, StateProof, StateRoot> Freeze for Attestation<Da, StateProof, StateRoot>
where StateRoot: Freeze, <Da as DaSpec>::SlotHash: Freeze, StateProof: Freeze,

§

impl<Da, StateProof, StateRoot> RefUnwindSafe for Attestation<Da, StateProof, StateRoot>
where StateRoot: RefUnwindSafe, <Da as DaSpec>::SlotHash: RefUnwindSafe, StateProof: RefUnwindSafe,

§

impl<Da, StateProof, StateRoot> Send for Attestation<Da, StateProof, StateRoot>
where StateRoot: Send, StateProof: Send,

§

impl<Da, StateProof, StateRoot> Sync for Attestation<Da, StateProof, StateRoot>
where StateRoot: Sync, StateProof: Sync,

§

impl<Da, StateProof, StateRoot> Unpin for Attestation<Da, StateProof, StateRoot>
where StateRoot: Unpin, <Da as DaSpec>::SlotHash: Unpin, StateProof: Unpin,

§

impl<Da, StateProof, StateRoot> UnwindSafe for Attestation<Da, StateProof, StateRoot>
where StateRoot: UnwindSafe, <Da as DaSpec>::SlotHash: UnwindSafe, StateProof: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,