pub trait Config: Config + Config {
    type AuthorityId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize + MaxEncodedLen;
    type MaxAuthorities: Get<u32>;
    type DisabledValidators: DisabledValidators;
    type AllowMultipleBlocksPerSlot: Get<bool>;
    type SlotDuration: Get<<Self as Config>::Moment>;
}
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 AuthorityId: Member + Parameter + RuntimeAppPublic + MaybeSerializeDeserialize + MaxEncodedLen

The identifier type for an authority.

source

type MaxAuthorities: Get<u32>

The maximum number of authorities that the pallet can hold.

source

type DisabledValidators: DisabledValidators

A way to check whether a given validator is disabled and should not be authoring blocks. Blocks authored by a disabled validator will lead to a panic as part of this module’s initialization.

source

type AllowMultipleBlocksPerSlot: Get<bool>

Whether to allow block authors to create multiple blocks per slot.

If this is true, the pallet will allow slots to stay the same across sequential blocks. If this is false, the pallet will require that subsequent blocks always have higher slots than previous ones.

Regardless of the setting of this storage value, the pallet will always enforce the invariant that slots don’t move backwards as the chain progresses.

The typical value for this should be ‘false’ unless this pallet is being augmented by another pallet which enforces some limitation on the number of blocks authors can create using the same slot.

source

type SlotDuration: Get<<Self as Config>::Moment>

The slot duration Aura should run with, expressed in milliseconds. The effective value of this type should not change while the chain is running.

For backwards compatibility either use MinimumPeriodTimesTwo or a const.

This associated type is only present when compiled with the experimental feature.

Implementors§