Expand description
Pallet providing configuration and supporting runtime logic for the block participation data feature of Partner Chains SDK.
§Purpose of this pallet
This pallet provides the runtime-side logic supporting the block participation data feature of PC SDK. Unlike most pallets, this one is not meant to be interacted with either by the chain’s users or other runtime components in the system. Instead, it only serves two purposes:
- it provides all configuration required by the feature’s inherent data provider defined in the primitives crate
- it provides an inhrenent extrinsic that removes from the runtime storage data that has been already processed by the inherent data provider The reason for that is that the feature’s purpose is to produce inherent data containing block participation data for consumption by custom-written pallet provided by each Partner Chain itself.
The pallet is expected to be used together with the pallet_block_production_log when deployed in the
context of Partner Chains SDK.
§Usage
§Adding into the runtime
Consult documentation of pallet::Config for details on each configuration field.
Assuming that the runtime also contains the pallet_block_production_log, an example configuration of
the pallet might look like the following:
const RELEASE_PERIOD: u64 = 128;
impl pallet_block_participation::Config for Runtime {
type WeightInfo = pallet_block_participation::weights::SubstrateWeight<Runtime>;
type BlockAuthor = BlockAuthor;
type DelegatorId = DelegatorKey;
type BlockParticipationProvider = BlockProductionLog;
const TARGET_INHERENT_ID: InherentIdentifier = *b"_example";
}Re-exports§
pub use pallet::*;
Modules§
- pallet
- The
palletmodule in each FRAME pallet hosts the most important items needed to construct this pallet. - weights
- Autogenerated weights for pallet_block_participation
Traits§
- Block
Participation Provider - Source of block participation data