pub trait Config: Config<OnSetCode = ParachainSetCode<Self>> {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type OnSystemEvent: OnSystemEvent;
    type SelfParaId: Get<ParaId>;
    type OutboundXcmpMessageSource: XcmpMessageSource;
    type DmpMessageHandler: DmpMessageHandler;
    type ReservedDmpWeight: Get<Weight>;
    type XcmpMessageHandler: XcmpMessageHandler;
    type ReservedXcmpWeight: Get<Weight>;
    type CheckAssociatedRelayNumber: CheckAssociatedRelayNumber;
    type ConsensusHook: ConsensusHook;
}
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 RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type OnSystemEvent: OnSystemEvent

Something which can be notified when the validation data is set.

source

type SelfParaId: Get<ParaId>

Returns the parachain ID we are running with.

source

type OutboundXcmpMessageSource: XcmpMessageSource

The place where outbound XCMP messages come from. This is queried in finalize_block.

source

type DmpMessageHandler: DmpMessageHandler

The message handler that will be invoked when messages are received via DMP.

source

type ReservedDmpWeight: Get<Weight>

The weight we reserve at the beginning of the block for processing DMP messages.

source

type XcmpMessageHandler: XcmpMessageHandler

The message handler that will be invoked when messages are received via XCMP.

The messages are dispatched in the order they were relayed by the relay chain. If multiple messages were relayed at one block, these will be dispatched in ascending order of the sender’s para ID.

source

type ReservedXcmpWeight: Get<Weight>

The weight we reserve at the beginning of the block for processing XCMP messages.

source

type CheckAssociatedRelayNumber: CheckAssociatedRelayNumber

Something that can check the associated relay parent block number.

source

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.

This config type is only available when the parameterized-consensus-hook crate feature is activated.

Implementors§