pub trait Config: Config {
    type BeefyId: Member + Parameter + BeefyAuthorityId<Keccak256> + MaybeSerializeDeserialize + MaxEncodedLen;
    type MaxAuthorities: Get<u32>;
    type MaxNominators: Get<u32>;
    type MaxSetIdSessionEntries: Get<u64>;
    type OnNewValidatorSet: OnNewValidatorSet<<Self as Config>::BeefyId>;
    type WeightInfo: WeightInfo;
    type KeyOwnerProof: Parameter + GetSessionNumber + GetValidatorCount;
    type EquivocationReportSystem: OffenceReportSystem<Option<Self::AccountId>, (DoubleVotingProof<BlockNumberFor<Self>, <Self as Config>::BeefyId, <<Self as Config>::BeefyId as RuntimeAppPublic>::Signature>, <Self as Config>::KeyOwnerProof)>;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait.

Required Associated Types§

source

type BeefyId: Member + Parameter + BeefyAuthorityId<Keccak256> + MaybeSerializeDeserialize + MaxEncodedLen

Authority identifier type

source

type MaxAuthorities: Get<u32>

The maximum number of authorities that can be added.

source

type MaxNominators: Get<u32>

The maximum number of nominators for each validator.

source

type MaxSetIdSessionEntries: Get<u64>

The maximum number of entries to keep in the set id to session index mapping.

Since the SetIdSession map is only used for validating equivocations this value should relate to the bonding duration of whatever staking system is being used (if any). If equivocation handling is not enabled then this value can be zero.

source

type OnNewValidatorSet: OnNewValidatorSet<<Self as Config>::BeefyId>

A hook to act on the new BEEFY validator set.

For some applications it might be beneficial to make the BEEFY validator set available externally apart from having it in the storage. For instance you might cache a light weight MMR root over validators and make it available for Light Clients.

source

type WeightInfo: WeightInfo

Weights for this pallet.

source

type KeyOwnerProof: Parameter + GetSessionNumber + GetValidatorCount

The proof of key ownership, used for validating equivocation reports The proof must include the session index and validator count of the session at which the equivocation occurred.

source

type EquivocationReportSystem: OffenceReportSystem<Option<Self::AccountId>, (DoubleVotingProof<BlockNumberFor<Self>, <Self as Config>::BeefyId, <<Self as Config>::BeefyId as RuntimeAppPublic>::Signature>, <Self as Config>::KeyOwnerProof)>

The equivocation handling subsystem.

Defines methods to publish, check and process an equivocation offence.

Object Safety§

This trait is not object safe.

Implementors§