referrerpolicy=no-referrer-when-downgrade

WeightedPointsFormulaStartEra

Type Alias WeightedPointsFormulaStartEra 

Source
pub type WeightedPointsFormulaStartEra<T: Config> = StorageValue<_GeneratedPrefixForStorageWeightedPointsFormulaStartEra<T>, EraIndex, OptionQuery>;
Expand description

Cutoff era from which the validator self-stake incentive switches to the weighted-points formula.

None is the pre-migration state for chains whose storage predates this item. Until the migration records a cutoff, session_rotation::Eras::uses_weighted_points treats all eras as weighted-points eras. Chains initialized with this storage item set the cutoff to 0 in genesis_build, and the upgrade migration leaves any existing value untouched.

See session_rotation::Eras::uses_weighted_points for the exact semantics and the rationale for the cutoff.

TODO(staking-async): remove this storage item, the legacy stake-only branch in crate::Pallet::calculate_validator_incentive_for_page, the session_rotation::Eras::uses_weighted_points cutoff helper, and the crate::migrations::SetWeightedPointsFormulaStartEra migration once Config::HistoryDepth eras have elapsed since the upgrade — i.e. once the cutoff satisfies cutoff <= active_era - HistoryDepth, at which point no pre-cutoff era remains claimable and every live era uses the weighted-points formula.

Storage type is [StorageValue] with value type EraIndex.

Aliased Type§

pub struct WeightedPointsFormulaStartEra<T: Config>(/* private fields */);