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:
Pallet::reserveallocates a para id here and takesConfig::ReservationConsideration.Pallet::registertakesConfig::RegistrationConsiderationfor 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.- 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.
- 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
palletmodule in each FRAME pallet hosts the most important items needed to construct this pallet. - weights
- Autogenerated weights for
pallet_registrar_para
Structs§
- Para
Info - Everything this chain knows about one para id.
Enums§
- Registration
State - Where a para id sits in the registration flow.
Traits§
- Send
ToRelay - Used to send an XCM
Transactto the registrar pallet on the remote relay chain.
Type Aliases§
- Para
Info Of - The
ParaInfotype as configured. - Provided
Block Number Of - Block number used for registration deadlines.