referrerpolicy=no-referrer-when-downgrade

Crate pallet_registrar_para

Crate pallet_registrar_para 

Source
Expand description

§Parachain registrar pallet

The user-facing half of parachain registration. It hands out para ids, takes the manager’s deposits as [Consideration] tickets, and coordinates the registration itself asynchronously with the chain that owns the parachain registry.

Both directions of that coordination are abstract: requests go out through SendToRelay, verdicts come back in through Pallet::receive, gated by Config::RelayOrigin. Nothing here depends on XCM or on the other chain’s extrinsics.

§Registration flow

Registration takes two transactions on two chains. Sending a multi-megabyte validation code through the messaging layer would be wasteful, so this chain only commits to its hash and length and the blob is uploaded to the relay chain directly:

  1. Pallet::reserve allocates a para id here and takes Config::ReservationConsideration.
  2. Pallet::register takes Config::RegistrationConsideration for the head data and the declared code length, then asks the relay chain to accept the registration. Only the code hash and length are sent.
  3. The manager uploads the validation code to the relay chain, which accepts it only if it matches the hash and length committed to in step 2.
  4. The verdict arrives back as Pallet::receive, which either finalises the registration or releases the registration deposit.

§Giving up

Nothing on the relay chain times a registration out, so a request whose code never turns up waits until the manager ends it with Pallet::cancel_registration. That asks the relay chain to drop the authorization and only releases the deposit once it confirms, which is what keeps a cancellation from freeing the deposit on a para that did register after all.

Deposits only ever live on this chain; the relay chain takes nothing.

Re-exports§

pub use weights::WeightInfo;
pub use pallet::*;

Modules§

pallet
The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
weights
Autogenerated weights for pallet_registrar_para

Structs§

ParaInfo
Everything this chain knows about one para id.

Enums§

RegistrationState
Where a para id sits in the registration flow.

Traits§

SendToRelay
Used to send an XCM Transact to the registrar pallet on the remote relay chain.

Type Aliases§

ParaInfoOf
The ParaInfo type as configured.
ProvidedBlockNumberOf
Block number used for registration deadlines.