Crate parachain_piece
source ·Expand description
Allow collators to include information about the relay chain, parachain, and their relationship, via an inherent.
This piece is necessary if the runtime is going to work as a parachain.
In each block, the block author must include a single SetParachainInfo
transaction that consumes the
corresponding UTXO that was created in the previous block, and creates a new one with updated parachain info.
This is quite similar to how the timestamp inherent works, except that in this case we are consuming the previous
input directly instead of peeking. This decision may be revisitied if keeping the info around would be useful.
§Comparison with Cumulus Pallet Parachain System
This is similar to FRAME’s pallet parachain system, although this piece is only responsible for the inherent flow while that pallet is responsible for most of the core parachain requirements including the validate block function.
§Hack Warning
Like the timestamp piece, this piece currently abuses the UpForGrabs verifier. This should be replaced with an Unspendable verifier and an eviction workflow.
Structs§
- The inherent data that is passed by the collator to the parachain runtime.
- A constraint checker for the simple act of including new parachain information.
Enums§
- Reasons that setting or cleaning up the parachain info may go wrong.
Traits§
- Options to configure the timestamp piece when it is aggregated or used in a runtime.