Files
pezkuwi-runtime-templates/docs/modules/ROOT/pages/pezpallets/aura_ext.adoc
T

48 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
:source-highlighter: highlight.js
:highlightjs-languages: rust
:github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
= pezcumulus_pezpallet_aura_ext
Branch/Release: `release-pezkuwi-v1.10.0`
== Purpose
This pezpallet integrates teyrchains own block production mechanism (for example AuRa) into Pezpezcumulus teyrchain system. It allows:
- to manage the unincluded blocks from the current slot
- to validate produced block against the relay chain
== Configuration and Integration link:https://github.com/pezkuwichain/pezkuwi-sdk/tree/release-pezkuwi-v1.10.0/pezcumulus/pezpallets/aura-ext[{github-icon},role=heading-link]
There is no special config for this integration and it has no dispatchables, but you need to integrate it with other `teyrchain-system` crate:
=== Integrate `BlockExecutor`
When you invoke the `register_validate_block` macro, you should provide `pezcumulus_pezpallet_aura_ext::BlockExecutor` to it to allow `aura-ext` to validate the blocks produced by `aura`
[source, rust]
----
pezcumulus_pezpallet_teyrchain_system::register_validate_block! {
Runtime = Runtime,
BlockExecutor = pezcumulus_pezpallet_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.
[source, rust]
----
impl pezcumulus_pezpallet_teyrchain_system::Config for Runtime {
...
type ConsensusHook = pezcumulus_pezpallet_aura_ext::FixedVelocityConsensusHook<
Runtime,
RELAY_CHAIN_SLOT_DURATION_MILLIS,
BLOCK_PTYRESSING_VELOCITY,
UNINCLUDED_SEGMENT_CAPACITY,
>;
}
----