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§
Sourcetype UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>
type UpdateOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin allowed to change MaxCollators, ReportPeriod, ExpectedEraDuration
and ReportMargin.
Sourcetype ValidatorRegistration: ValidatorRegistration<Self::AccountId>
type ValidatorRegistration: ValidatorRegistration<Self::AccountId>
Lookup of registered session keys.
Sourcetype MaxValidators: Get<u32>
type MaxValidators: Get<u32>
Maximum number of validators in a received set.
Sourcetype MaxEntriesPerReport: Get<u32>
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.
Sourcetype PeriodicSession: ShouldEndSession<BlockNumberFor<Self>>
type PeriodicSession: ShouldEndSession<BlockNumberFor<Self>>
The regular session rotation rule kept next to the forced rotations.
Sourcetype BlockReporter: ReportAuthoredBlocks<Self::AccountId>
type BlockReporter: ReportAuthoredBlocks<Self::AccountId>
Hands the block counts of one report to the chain that credits them.
Sourcetype DefaultMaxCollators: Get<CollatorDraw>
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.
Sourcetype DefaultReportPeriod: Get<BlockNumberFor<Self>>
type DefaultReportPeriod: Get<BlockNumberFor<Self>>
Number of blocks between two reports until governance sets ReportPeriod.
Sourcetype DefaultExpectedEraDuration: Get<u64>
type DefaultExpectedEraDuration: Get<u64>
Value of ExpectedEraDuration until governance sets it, in milliseconds.
Sourcetype DefaultReportMargin: Get<u64>
type DefaultReportMargin: Get<u64>
Value of ReportMargin until governance sets it, in milliseconds.
Sourcetype MaxReportMargin: Get<u64>
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.
Sourcetype WeightInfo: WeightInfo
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.