cumulus_pallet_aura_ext
Branch/Release: release-polkadot-v1.10.0
Purpose
This pallet integrates parachain’s own block production mechanism (for example AuRa) into Cumulus parachain system. It allows:
-
to manage the unincluded blocks from the current slot
-
to validate produced block against the relay chain
Configuration and Integration
There is no special config for this integration and it has no dispatchables, but you need to integrate it with other parachain-system
crate:
Integrate BlockExecutor
When you invoke the register_validate_block
macro, you should provide cumulus_pallet_aura_ext::BlockExecutor
to it to allow aura-ext
to validate the blocks produced by aura
cumulus_pallet_parachain_system::register_validate_block! {
Runtime = Runtime,
BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,
}
Integrate ConsensusHook
Also you might want to manage the consensus externally and control the segment that is not yet included (its capacity, speed and etc.) aura-ext
provides the FixedVelocityConsensusHook
that allows to check if we are still in the limits for the slot.
impl cumulus_pallet_parachain_system::Config for Runtime {
...
type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook<
Runtime,
RELAY_CHAIN_SLOT_DURATION_MILLIS,
BLOCK_PROCESSING_VELOCITY,
UNINCLUDED_SEGMENT_CAPACITY,
>;
}