Trait pallet_collator_selection::pallet::Config
source · pub trait Config: Config {
Show 15 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Currency: ReservableCurrency<Self::AccountId>;
type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type PotId: Get<PalletId>;
type MaxCandidates: Get<u32>;
type MinCandidates: Get<u32>;
type MaxInvulnerables: Get<u32>;
type KickThreshold: Get<BlockNumberFor<Self>>;
type ValidatorId: Member + Parameter;
type ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>;
type ValidatorRegistration: ValidatorRegistration<Self::ValidatorId>;
type ValidatorSet: ValidatorSet<Self::AccountId, ValidatorId = Self::AccountId>;
type SlashRatio: Get<Perbill>;
type AccountCheck: AccountCheck<Self::AccountId>;
type WeightInfo: WeightInfo;
}
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. Configure the pallet by specifying the parameters and types on which it depends.
Required Associated Types§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Overarching event type.
sourcetype UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>
type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin that can dictate updating parameters of this pallet.
sourcetype MaxCandidates: Get<u32>
type MaxCandidates: Get<u32>
Maximum number of candidates that we should have. This is used for benchmarking and is not enforced.
This does not take into account the invulnerables.
sourcetype MinCandidates: Get<u32>
type MinCandidates: Get<u32>
Minimum number of candidates that we should have. This is used for disaster recovery.
This does not take into account the invulnerables.
sourcetype MaxInvulnerables: Get<u32>
type MaxInvulnerables: Get<u32>
Maximum number of invulnerables.
Used only for benchmarking.
sourcetype KickThreshold: Get<BlockNumberFor<Self>>
type KickThreshold: Get<BlockNumberFor<Self>>
Will be kicked if block is not produced in threshold.
sourcetype ValidatorId: Member + Parameter
type ValidatorId: Member + Parameter
A stable ID for a validator.
sourcetype ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>
type ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>
A conversion from account ID to validator ID.
Its cost must be at most one storage read.
sourcetype ValidatorRegistration: ValidatorRegistration<Self::ValidatorId>
type ValidatorRegistration: ValidatorRegistration<Self::ValidatorId>
Validate a user is registered
sourcetype ValidatorSet: ValidatorSet<Self::AccountId, ValidatorId = Self::AccountId>
type ValidatorSet: ValidatorSet<Self::AccountId, ValidatorId = Self::AccountId>
Something that can give information about the current validator set.
sourcetype SlashRatio: Get<Perbill>
type SlashRatio: Get<Perbill>
How many in perc kicked collators should be slashed (set 0 to disable)
sourcetype AccountCheck: AccountCheck<Self::AccountId>
type AccountCheck: AccountCheck<Self::AccountId>
Used to check whether an account is allowed to be a candidate.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
The weight information of this pallet.