Following information is kept for eras in [current_era - HistoryDepth, current_era]: ErasStakers, ErasStakersClipped,
ErasValidatorPrefs, ErasValidatorReward, ErasRewardPoints,
ErasTotalStake, ErasStartSessionIndex, ClaimedRewards, ErasStakersPaged,
ErasStakersOverview.
Must be more than the number of eras delayed by session.
I.e. active era must always be in history. I.e. active_era > current_era - history_depth must be guaranteed.
If migrating an existing pallet from storage value to config value,
this should be set to same value or greater as in storage.
Note: HistoryDepth is used as the upper bound for the BoundedVec
item StakingLedger.legacy_claimed_rewards. Setting this value lower than
the existing value can lead to inconsistencies in the
StakingLedger and will need to be handled properly in a migration.
The test reducing_history_depth_abrupt shows this effect.
Number of eras to keep in history.
Following information is kept for eras in
[current_era - HistoryDepth, current_era]:ErasStakers,ErasStakersClipped,ErasValidatorPrefs,ErasValidatorReward,ErasRewardPoints,ErasTotalStake,ErasStartSessionIndex,ClaimedRewards,ErasStakersPaged,ErasStakersOverview.Must be more than the number of eras delayed by session. I.e. active era must always be in history. I.e.
active_era > current_era - history_depthmust be guaranteed.If migrating an existing pallet from storage value to config value, this should be set to same value or greater as in storage.
Note:
HistoryDepthis used as the upper bound for theBoundedVecitemStakingLedger.legacy_claimed_rewards. Setting this value lower than the existing value can lead to inconsistencies in theStakingLedgerand will need to be handled properly in a migration. The testreducing_history_depth_abruptshows this effect.