pub trait Config: Config {
Show 18 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type BlockAuthoringDelay: Get<Slot>;
type PotEntropyInjectionInterval: Get<BlockNumberFor<Self>>;
type PotEntropyInjectionLookbackDepth: Get<u8>;
type PotEntropyInjectionDelay: Get<Slot>;
type EraDuration: Get<BlockNumberFor<Self>>;
type InitialSolutionRange: Get<SolutionRange>;
type SlotProbability: Get<(u64, u64)>;
type ConfirmationDepthK: Get<BlockNumberFor<Self>>;
type RecentSegments: Get<HistorySize>;
type RecentHistoryFraction: Get<(HistorySize, HistorySize)>;
type MinSectorLifetime: Get<HistorySize>;
type ExpectedVotesPerBlock: Get<u32>;
type MaxPiecesInSector: Get<u16>;
type ShouldAdjustSolutionRange: Get<bool>;
type EraChangeTrigger: EraChangeTrigger;
type WeightInfo: WeightInfo;
type BlockSlotCount: Get<u32>;
}
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§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype BlockAuthoringDelay: Get<Slot>
type BlockAuthoringDelay: Get<Slot>
Number of slots between slot arrival and when corresponding block can be produced.
Practically this means future proof of time proof needs to be revealed this many slots ahead before block can be authored even though solution is available before that.
sourcetype PotEntropyInjectionInterval: Get<BlockNumberFor<Self>>
type PotEntropyInjectionInterval: Get<BlockNumberFor<Self>>
Interval, in blocks, between blockchain entropy injection into proof of time chain.
sourcetype PotEntropyInjectionLookbackDepth: Get<u8>
type PotEntropyInjectionLookbackDepth: Get<u8>
Interval, in entropy injection intervals, where to take entropy for injection from.
sourcetype PotEntropyInjectionDelay: Get<Slot>
type PotEntropyInjectionDelay: Get<Slot>
Delay after block, in slots, when entropy injection takes effect.
sourcetype EraDuration: Get<BlockNumberFor<Self>>
type EraDuration: Get<BlockNumberFor<Self>>
The amount of time, in blocks, that each era should last. NOTE: Currently it is not possible to change the era duration after the chain has started. Attempting to do so will brick block production.
sourcetype InitialSolutionRange: Get<SolutionRange>
type InitialSolutionRange: Get<SolutionRange>
Initial solution range used for challenges during the very first era.
sourcetype SlotProbability: Get<(u64, u64)>
type SlotProbability: Get<(u64, u64)>
How often in slots slots (on average, not counting collisions) will have a block.
Expressed as a rational where the first member of the tuple is the numerator and the second is the denominator. The rational should represent a value between 0 and 1.
sourcetype ConfirmationDepthK: Get<BlockNumberFor<Self>>
type ConfirmationDepthK: Get<BlockNumberFor<Self>>
Depth K
after which a block enters the recorded history (a global constant, as opposed
to the client-dependent transaction confirmation depth k
).
sourcetype RecentSegments: Get<HistorySize>
type RecentSegments: Get<HistorySize>
Number of latest archived segments that are considered “recent history”.
sourcetype RecentHistoryFraction: Get<(HistorySize, HistorySize)>
type RecentHistoryFraction: Get<(HistorySize, HistorySize)>
Fraction of pieces from the “recent history” (recent_segments
) in each sector.
sourcetype MinSectorLifetime: Get<HistorySize>
type MinSectorLifetime: Get<HistorySize>
Minimum lifetime of a plotted sector, measured in archived segment.
sourcetype ExpectedVotesPerBlock: Get<u32>
type ExpectedVotesPerBlock: Get<u32>
Number of votes expected per block.
This impacts solution range for votes in consensus.
sourcetype MaxPiecesInSector: Get<u16>
type MaxPiecesInSector: Get<u16>
How many pieces one sector is supposed to contain (max)
type ShouldAdjustSolutionRange: Get<bool>
sourcetype EraChangeTrigger: EraChangeTrigger
type EraChangeTrigger: EraChangeTrigger
Subspace requires some logic to be triggered on every block to query for whether an era has ended and to perform the transition to the next era.
Era is normally used to update solution range used for challenges.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype BlockSlotCount: Get<u32>
type BlockSlotCount: Get<u32>
Maximum number of block number to block slot mappings to keep (oldest pruned first).
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.