Expand description
Provides the core runtime logic for managing blockchain actors (authors/validators) across their full lifecycle.
- Election orchestration (via
ElectAuthors) - Affidavit submission and validation (via
ElectionAffidavits) - Contribution tracking through session-scoped points (via
AuthorPoints, although swappable viaConfig::PointsAdapter) - Reward scheduling based on participation (via
RewardAuthors) - Penalty scheduling for misbehavior (via
PenalizeAuthors)
The module acts as a bridge layer between generic trait abstractions and pallet-specific storage, timing, and role-management systems.
ยงDesign Overview
-
Session-driven lifecycle: All operations (affidavits, elections, points, rewards, penalties) are scoped to sessions and aligned with deterministic session timing.
-
Time-gated execution: Affidavit submission and election processing are strictly bounded by windows derived from session start and configurable percentages.
-
Separation of concerns:
- This module coordinates when and what to execute.
- External adapters/plugins define how logic is executed:
- Election logic:
Config::ElectionAdapter - Reward logic:
Config::RewardModel,Config::InflationModel - Penalty logic:
Config::PenaltyModel
- Election logic:
-
Deterministic and auditable: All operations avoid side effects and remain reproducible across nodes.
-
Deferred execution model: Rewards and penalties are scheduled, not immediately finalized, allowing downstream systems to aggregate, adjust, or revert them.