referrerpolicy=no-referrer-when-downgrade
sp_consensus_beefy::mmr

Type Alias BeefyNextAuthoritySet

Source
pub type BeefyNextAuthoritySet<MerkleRoot> = BeefyAuthoritySet<MerkleRoot>;
Expand description

Details of the next BEEFY authority set.

Aliased Type§

struct BeefyNextAuthoritySet<MerkleRoot> {
    pub id: u64,
    pub len: u32,
    pub keyset_commitment: MerkleRoot,
}

Fields§

§id: u64

Id of the set.

Id is required to correlate BEEFY signed commitments with the validator set. Light Client can easily verify that the commitment witness it is getting is produced by the latest validator set.

§len: u32

Number of validators in the set.

Some BEEFY Light Clients may use an interactive protocol to verify only a subset of signatures. We put set length here, so that these clients can verify the minimal number of required signatures.

§keyset_commitment: MerkleRoot

Commitment(s) to BEEFY AuthorityIds.

This is used by Light Clients to confirm that the commitments are signed by the correct validator set. Light Clients using interactive protocol, might verify only subset of signatures, hence don’t require the full list here (will receive inclusion proofs).

This could be Merkle Root Hash built from BEEFY ECDSA public keys and/or polynomial commitment to the polynomial interpolating BLS public keys which is used by APK proof based light clients to verify the validity of aggregated BLS keys using APK proofs. Multiple commitments can be tupled together.

Trait Implementations

Source§

impl<AuthoritySetCommitment: Clone> Clone for BeefyAuthoritySet<AuthoritySetCommitment>

Source§

fn clone(&self) -> BeefyAuthoritySet<AuthoritySetCommitment>

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<AuthoritySetCommitment: Debug> Debug for BeefyAuthoritySet<AuthoritySetCommitment>

Source§

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

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

impl<AuthoritySetCommitment> Decode for BeefyAuthoritySet<AuthoritySetCommitment>
where AuthoritySetCommitment: Decode,

Source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl<AuthoritySetCommitment: Default> Default for BeefyAuthoritySet<AuthoritySetCommitment>

Source§

fn default() -> BeefyAuthoritySet<AuthoritySetCommitment>

Returns the “default value” for a type. Read more
Source§

impl<'de, AuthoritySetCommitment> Deserialize<'de> for BeefyAuthoritySet<AuthoritySetCommitment>
where AuthoritySetCommitment: 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<AuthoritySetCommitment> Encode for BeefyAuthoritySet<AuthoritySetCommitment>
where AuthoritySetCommitment: Encode,

Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl<AuthoritySetCommitment> MaxEncodedLen for BeefyAuthoritySet<AuthoritySetCommitment>
where AuthoritySetCommitment: MaxEncodedLen,

Source§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
Source§

impl<AuthoritySetCommitment: PartialEq> PartialEq for BeefyAuthoritySet<AuthoritySetCommitment>

Source§

fn eq(&self, other: &BeefyAuthoritySet<AuthoritySetCommitment>) -> 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<AuthoritySetCommitment> Serialize for BeefyAuthoritySet<AuthoritySetCommitment>
where AuthoritySetCommitment: 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<AuthoritySetCommitment> TypeInfo for BeefyAuthoritySet<AuthoritySetCommitment>
where AuthoritySetCommitment: TypeInfo + 'static,

Source§

type Identity = BeefyAuthoritySet<AuthoritySetCommitment>

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl<AuthoritySetCommitment> EncodeLike for BeefyAuthoritySet<AuthoritySetCommitment>
where AuthoritySetCommitment: Encode,

Source§

impl<AuthoritySetCommitment: Eq> Eq for BeefyAuthoritySet<AuthoritySetCommitment>

Source§

impl<AuthoritySetCommitment> StructuralPartialEq for BeefyAuthoritySet<AuthoritySetCommitment>