pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
type ReservationConsideration: Consideration<Self::AccountId, Footprint>;
type RegistrationConsideration: Consideration<Self::AccountId, Footprint>;
type SendToRelay: SendToRelay<AccountId = Self::AccountId>;
type RelayOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type FirstPublicParaId: Get<ParaId>;
type MinCodeSize: Get<u32>;
type MaxCodeSize: Get<u32>;
type MaxHeadDataSize: Get<u32>;
type PendingDeadline: Get<ProvidedBlockNumberOf<Self>>;
type BlockNumberProvider: BlockNumberProvider;
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.
Required Associated Types§
Sourcetype ReservationConsideration: Consideration<Self::AccountId, Footprint>
type ReservationConsideration: Consideration<Self::AccountId, Footprint>
The cost of reserving a para id. The footprint is a single zero-sized item, so a flat price fits.
Sourcetype RegistrationConsideration: Consideration<Self::AccountId, Footprint>
type RegistrationConsideration: Consideration<Self::AccountId, Footprint>
The cost of a registration, on top of the reservation. The footprint is one item sized as head data plus declared code length, so a per-byte price fits.
Sourcetype SendToRelay: SendToRelay<AccountId = Self::AccountId>
type SendToRelay: SendToRelay<AccountId = Self::AccountId>
Sends messages to the relay chain.
Sourcetype RelayOrigin: EnsureOrigin<Self::RuntimeOrigin>
type RelayOrigin: EnsureOrigin<Self::RuntimeOrigin>
An origin that is sure to be the relay chain’s registrar pallet.
Sourcetype FirstPublicParaId: Get<ParaId>
type FirstPublicParaId: Get<ParaId>
The lowest para id this pallet will hand out.
Mirrors the relay chain’s LOWEST_PUBLIC_ID. Ids below it are reserved for system
parachains and are not obtainable here.
Sourcetype MinCodeSize: Get<u32>
type MinCodeSize: Get<u32>
The smallest validation code the relay chain will accept.
A local mirror of the relay chain’s MIN_CODE_SIZE, used to fail early. The relay
chain checks the real thing against its own live configuration.
Sourcetype MaxCodeSize: Get<u32>
type MaxCodeSize: Get<u32>
The largest validation code the relay chain will accept.
A local mirror of the relay chain’s max_code_size. See Config::MinCodeSize.
Sourcetype MaxHeadDataSize: Get<u32>
type MaxHeadDataSize: Get<u32>
The largest head data the relay chain will accept.
A local mirror of the relay chain’s max_head_data_size. See Config::MinCodeSize.
Sourcetype PendingDeadline: Get<ProvidedBlockNumberOf<Self>>
type PendingDeadline: Get<ProvidedBlockNumberOf<Self>>
How long a manager waits for the relay chain before giving up on a registration.
Measured in Config::BlockNumberProvider blocks. Should comfortably cover a round
trip, so that a verdict that is merely slow lands before anybody tries to cancel.
Sourcetype BlockNumberProvider: BlockNumberProvider
type BlockNumberProvider: BlockNumberProvider
Source of block numbers for registration deadlines.
On a parachain this should be
cumulus_pallet_parachain_system::RelaychainDataProvider, so
Config::PendingDeadline is in relay-chain blocks.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for the 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.