pub trait Config: Config {
    type RuntimeEvent: From<Event> + Into<<Self as Config>::RuntimeEvent> + IsType<<Self as Config>::RuntimeEvent>;
    type WeightInfo: WeightInfo;
    type MaxAuthorities: Get<u32>;
    type MaxNominators: Get<u32>;
    type MaxSetIdSessionEntries: Get<u64>;
    type KeyOwnerProof: Parameter + GetSessionNumber + GetValidatorCount;
    type EquivocationReportSystem: OffenceReportSystem<Option<Self::AccountId>, (EquivocationProof<Self::Hash, BlockNumberFor<Self>>, Self::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 RuntimeEvent: From<Event> + Into<<Self as Config>::RuntimeEvent> + IsType<<Self as Config>::RuntimeEvent>

The event type of this module.

source

type WeightInfo: WeightInfo

Weights for this pallet.

source

type MaxAuthorities: Get<u32>

Max Authorities in use

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 KeyOwnerProof: Parameter + GetSessionNumber + GetValidatorCount

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

source

type EquivocationReportSystem: OffenceReportSystem<Option<Self::AccountId>, (EquivocationProof<Self::Hash, BlockNumberFor<Self>>, Self::KeyOwnerProof)>

The equivocation handling subsystem, defines methods to check/report an offence and for submitting a transaction to report an equivocation (from an offchain context).

Implementors§