Trait pallet_beefy::pallet::Config
source · 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 AncestryHelper: AncestryHelper<HeaderFor<Self>> + AncestryHelperWeightInfo<HeaderFor<Self>>;
type WeightInfo: WeightInfo;
type KeyOwnerProof: Parameter + GetSessionNumber + GetValidatorCount;
type EquivocationReportSystem: OffenceReportSystem<Option<Self::AccountId>, EquivocationEvidenceFor<Self>>;
}
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§
sourcetype BeefyId: Member + Parameter + BeefyAuthorityId<Keccak256> + MaybeSerializeDeserialize + MaxEncodedLen
type BeefyId: Member + Parameter + BeefyAuthorityId<Keccak256> + MaybeSerializeDeserialize + MaxEncodedLen
Authority identifier type
sourcetype MaxAuthorities: Get<u32>
type MaxAuthorities: Get<u32>
The maximum number of authorities that can be added.
sourcetype MaxNominators: Get<u32>
type MaxNominators: Get<u32>
The maximum number of nominators for each validator.
sourcetype MaxSetIdSessionEntries: Get<u64>
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.
sourcetype OnNewValidatorSet: OnNewValidatorSet<<Self as Config>::BeefyId>
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.
sourcetype AncestryHelper: AncestryHelper<HeaderFor<Self>> + AncestryHelperWeightInfo<HeaderFor<Self>>
type AncestryHelper: AncestryHelper<HeaderFor<Self>> + AncestryHelperWeightInfo<HeaderFor<Self>>
Hook for checking commitment canonicity.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weights for this pallet.
sourcetype KeyOwnerProof: Parameter + GetSessionNumber + GetValidatorCount
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.
sourcetype EquivocationReportSystem: OffenceReportSystem<Option<Self::AccountId>, EquivocationEvidenceFor<Self>>
type EquivocationReportSystem: OffenceReportSystem<Option<Self::AccountId>, EquivocationEvidenceFor<Self>>
The equivocation handling subsystem.
Defines methods to publish, check and process an equivocation offence.