Expand description
Converts reported units of a validator service into era points, intended to be used in Asset Hub.
Receives the blocks validators author on system chains and on the chain that runs this pallet.
§Overview
Each system chain counts the blocks its authors produce in pallet-validator-collators and
reports the counts of the validators. Other chains call Pallet::report_authored_blocks
from Config::ReportOrigin, which names the reporting chain as a Config::Source. The
chain that runs this pallet credits its own counts through Pallet::credit_authored_blocks.
A count becomes min(count, MaxBlocksPerEntry) × PointsPerService[(source, Collation)] era
points, handed to Config::RewardPoints as [sp_staking::ServiceKind::Collation]
points. A source without an entry for [sp_staking::ServiceKind::Collation] in
PointsPerService earns nothing. Governance sets the entries through
Config::PointsOrigin. Relay chain consensus points are not converted here.
For example, with PointsPerService[(source, Collation)] = 10 for a reporting chain, a report
from that chain of 40 units (blocks authored, for
[sp_staking::ServiceKind::Collation]) for an account credits it 400 era points.
Re-exports§
pub use pallet::*;