pub trait ParachainRegistrar {
type AccountId;
// Required methods
fn check_onboarding(head_len: u32, code_len: u32) -> Result<(), ()>;
fn is_registered(para_id: ParaId) -> bool;
fn register(
manager: Self::AccountId,
para_id: ParaId,
genesis_head: Vec<u8>,
validation_code: Vec<u8>,
) -> DispatchResult;
}Expand description
The parachain registry, as pallet-registrar-relay needs to see it.
Implemented by whichever pallet owns parachain registration, typically paras_registrar on the
relay chain. Lives here so neither side of the protocol has to depend on the other.
Required Associated Types§
Required Methods§
Sourcefn check_onboarding(head_len: u32, code_len: u32) -> Result<(), ()>
fn check_onboarding(head_len: u32, code_len: u32) -> Result<(), ()>
Whether head data and code of these sizes could be onboarded right now.
Checked against the relay chain’s live configuration so a doomed request can be rejected before the user goes and uploads megabytes of code.
Sourcefn is_registered(para_id: ParaId) -> bool
fn is_registered(para_id: ParaId) -> bool
Whether the relay chain already knows this para id.
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.