referrerpolicy=no-referrer-when-downgrade

Config

Trait Config 

Source
pub trait Config: Config<RuntimeEvent: From<Event<Self>>> + Config<RuntimeEvent: From<Event<Self>>> {
Show 14 associated items type SetOrigin: EnsureOrigin<Self::RuntimeOrigin>; type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>; type ValidatorRegistration: ValidatorRegistration<Self::AccountId>; type MaxValidators: Get<u32>; type MaxEntriesPerReport: Get<u32>; type PeriodicSession: ShouldEndSession<BlockNumberFor<Self>>; type BlockReporter: ReportAuthoredBlocks<Self::AccountId>; type DefaultMaxCollators: Get<CollatorDraw>; type DefaultReportPeriod: Get<BlockNumberFor<Self>>; type UnixTime: UnixTime; type DefaultExpectedEraDuration: Get<u64>; type DefaultReportMargin: Get<u64>; type MaxReportMargin: Get<u64>; 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. Configuration trait of this pallet.

Required Associated Types§

Source

type SetOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin allowed to submit a validator set.

Source

type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>

Source

type ValidatorRegistration: ValidatorRegistration<Self::AccountId>

Lookup of registered session keys.

Source

type MaxValidators: Get<u32>

Maximum number of validators in a received set.

Source

type MaxEntriesPerReport: Get<u32>

Maximum number of entries of AuthoredBlocks that one report reads.

Authors are counted between two reports: the validators of the stored set, and the other collators of the chain, such as invulnerables and candidates. A sensible value is Config::MaxValidators, plus the maximum number of other collators the chain may have, plus a small buffer for the authors that leave the collators before the next report. Entries beyond it wait for the next report. The integrity_test checks that a report of this many entries fits a block.

Source

type PeriodicSession: ShouldEndSession<BlockNumberFor<Self>>

The regular session rotation rule kept next to the forced rotations.

Source

type BlockReporter: ReportAuthoredBlocks<Self::AccountId>

Hands the block counts of one report to the chain that credits them.

Source

type DefaultMaxCollators: Get<CollatorDraw>

Value of MaxCollators until governance sets it.

A runtime upgrade that changes it keeps the collators drawn under the previous value until the next draw, unless the upgrade sets PendingRotation to RotationState::AwaitingQueue.

Source

type DefaultReportPeriod: Get<BlockNumberFor<Self>>

Number of blocks between two reports until governance sets ReportPeriod.

Source

type UnixTime: UnixTime

Wall clock time, to time the report before the expected end of an era.

Source

type DefaultExpectedEraDuration: Get<u64>

Value of ExpectedEraDuration until governance sets it, in milliseconds.

Source

type DefaultReportMargin: Get<u64>

Value of ReportMargin until governance sets it, in milliseconds.

Source

type MaxReportMargin: Get<u64>

Largest value Pallet::set_report_margin accepts, in milliseconds.

A stored ReportMargin above it, as after a runtime upgrade that lowers it, is used up to it.

Source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

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§