referrerpolicy=no-referrer-when-downgrade

Trait Config

Source
pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type ValidatorId: Member + Parameter + MaybeSerializeDeserialize + MaxEncodedLen + TryFrom<Self::AccountId>;
    type ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>;
    type ShouldEndSession: ShouldEndSession<BlockNumberFor<Self>>;
    type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>;
    type SessionManager: SessionManager<Self::ValidatorId>;
    type SessionHandler: SessionHandler<Self::ValidatorId>;
    type Keys: OpaqueKeys + Member + Parameter + MaybeSerializeDeserialize;
    type DisablingStrategy: DisablingStrategy<Self>;
    type WeightInfo: WeightInfo;
    type Currency: Inspect<Self::AccountId> + HoldMutate<Self::AccountId, Reason: From<HoldReason>>;
    type KeyDeposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>;
}
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<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

Source

type ValidatorId: Member + Parameter + MaybeSerializeDeserialize + MaxEncodedLen + TryFrom<Self::AccountId>

A stable ID for a validator.

Source

type ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>

A conversion from account ID to validator ID.

It is also a means to check that an account id is eligible to set session keys, through being associated with a validator id. To disable this check, use [sp_runtime::traits::ConvertInto].

Its cost must be at most one storage read.

Source

type ShouldEndSession: ShouldEndSession<BlockNumberFor<Self>>

Indicator for when to end the session.

Source

type NextSessionRotation: EstimateNextSessionRotation<BlockNumberFor<Self>>

Something that can predict the next session rotation. This should typically come from the same logical unit that provides ShouldEndSession, yet, it gives a best effort estimate. It is helpful to implement [EstimateNextNewSession].

Source

type SessionManager: SessionManager<Self::ValidatorId>

Handler for managing new session.

Source

type SessionHandler: SessionHandler<Self::ValidatorId>

Handler when a session has changed.

Source

type Keys: OpaqueKeys + Member + Parameter + MaybeSerializeDeserialize

The keys.

Source

type DisablingStrategy: DisablingStrategy<Self>

DisablingStragegy controls how validators are disabled

Source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Source

type Currency: Inspect<Self::AccountId> + HoldMutate<Self::AccountId, Reason: From<HoldReason>>

The currency type for placing holds when setting keys.

Source

type KeyDeposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>

The amount to be held when setting keys.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime

impl Config for Runtime