pub trait Config: Config<OnSetCode = ParachainSetCode<Self>> + Config<RuntimeEvent: From<Event<Self>>> {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type OnSystemEvent: OnSystemEvent;
type SelfParaId: Get<ParaId>;
type OutboundXcmpMessageSource: XcmpMessageSource;
type DmpQueue: HandleMessage;
type ReservedDmpWeight: Get<Weight>;
type XcmpMessageHandler: XcmpMessageHandler;
type ReservedXcmpWeight: Get<Weight>;
type CheckAssociatedRelayNumber: CheckAssociatedRelayNumber;
type WeightInfo: WeightInfo;
type ConsensusHook: ConsensusHook;
type RelayParentOffset: 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 OnSystemEvent: OnSystemEvent
type OnSystemEvent: OnSystemEvent
Something which can be notified when the validation data is set.
Sourcetype SelfParaId: Get<ParaId>
type SelfParaId: Get<ParaId>
Returns the parachain ID we are running with.
Sourcetype OutboundXcmpMessageSource: XcmpMessageSource
type OutboundXcmpMessageSource: XcmpMessageSource
The place where outbound XCMP messages come from. This is queried in finalize_block
.
Sourcetype DmpQueue: HandleMessage
type DmpQueue: HandleMessage
Queues inbound downward messages for delayed processing.
All inbound DMP messages from the relay are pushed into this. The handler is expected to eventually process all the messages that are pushed to it.
Sourcetype ReservedDmpWeight: Get<Weight>
type ReservedDmpWeight: Get<Weight>
The weight we reserve at the beginning of the block for processing DMP messages.
Sourcetype XcmpMessageHandler: XcmpMessageHandler
type XcmpMessageHandler: XcmpMessageHandler
The message handler that will be invoked when messages are received via XCMP.
This should normally link to the XCMP Queue pallet.
Sourcetype ReservedXcmpWeight: Get<Weight>
type ReservedXcmpWeight: Get<Weight>
The weight we reserve at the beginning of the block for processing XCMP messages.
Sourcetype CheckAssociatedRelayNumber: CheckAssociatedRelayNumber
type CheckAssociatedRelayNumber: CheckAssociatedRelayNumber
Something that can check the associated relay parent block number.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight info for functions and calls.
Sourcetype ConsensusHook: ConsensusHook
type ConsensusHook: ConsensusHook
An entry-point for higher-level logic to manage the backlog of unincluded parachain blocks and authorship rights for those blocks.
Typically, this should be a hook tailored to the collator-selection/consensus mechanism that is used for this chain.
However, to maintain the same behavior as prior to asynchronous backing, provide the
consensus_hook::ExpectParentIncluded
here. This is only necessary in the case
that collators aren’t expected to have node versions that supply the included block
in the relay-chain state proof.
Sourcetype RelayParentOffset: Get<u32>
type RelayParentOffset: Get<u32>
The offset between the tip of the relay chain and the parent relay block used as parent when authoring a parachain block.
This setting directly impacts the number of descendant headers that are expected in the
set_validation_data
inherent.
For any setting N
larger than zero, the inherent expects that the inherent includes
the relay parent plus N
descendants. These headers are required to validate that new
parachain blocks are authored at the correct offset.
While this helps to reduce forks on the parachain side, it increases the delay for processing XCM messages. So, the value should be chosen wisely.
If set to 0, this config has no impact.
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.