Expand description
cumulus-pallet-parachain-system
is a base pallet for Cumulus-based parachains.
This pallet handles low-level details of being a parachain. Its responsibilities include:
- ingestion of the parachain validation data;
- ingestion and dispatch of incoming downward and lateral messages;
- coordinating upgrades with the Relay Chain; and
- communication of parachain outputs, such as sent messages, signaling an upgrade, etc.
Users must ensure that they register this pallet as an inherent provider.
Re-exports
pub use consensus_hook::ConsensusHook;
pub use consensus_hook::ExpectParentIncluded;
pub use relay_state_snapshot::MessagingStateSnapshot;
pub use relay_state_snapshot::RelayChainStateProof;
pub use pallet::*;
Modules
- The definition of a
ConsensusHook
trait for consensus logic to manage the backlog of parachain blocks ready to submit to the relay chain, as well as some basic implementations. - The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet. - Relay chain state proof provides means for accessing part of relay chain storage for reads.
- A module that enables a runtime to work as parachain.
Macros
- Register the
validate_block
function that is used by parachains to validate blocks on a validator.
Structs
- Provides an implementation of
CheckAssociatedRelayNumber
. - Holds the most recent relay-parent state root and block number of the current parachain block.
- Provides an implementation of
CheckAssociatedRelayNumber
. - Provides an implementation of
CheckAssociatedRelayNumber
. - RelaychainBlockNumberProviderDeprecatedImplements [
BlockNumberProvider
] that returns relay chain block number fetched from validation data. When validation data is not available (e.g. within on_initialize), 0 will be returned. - Implements [
BlockNumberProvider
] andRelaychainStateProvider
that returns relevant relay data fetched from validation data. NOTE: When validation data is not available (e.g. within on_initialize), default values will be returned.
Traits
- Something that can check the associated relay block number.
- CheckInherentsDeprecatedSomething that can check the inherents of a block.
- Something that should be informed about system related events.
- This exposes the
RelayChainState
to other runtime modules.