Skip to content

[pallet-staking] Clean up stale non paged exposure storages in the pallet#5986

Closed
Ank4n wants to merge 3 commits intomasterfrom
ankan/staking/cleanup-paged-exposure
Closed

[pallet-staking] Clean up stale non paged exposure storages in the pallet#5986
Ank4n wants to merge 3 commits intomasterfrom
ankan/staking/cleanup-paged-exposure

Conversation

@Ank4n
Copy link
Copy Markdown
Contributor

@Ank4n Ank4n commented Oct 8, 2024

closes #433

re-gius added a commit that referenced this pull request Nov 25, 2024
kianenigma added a commit that referenced this pull request Feb 10, 2025
… exposures (#7483)

Building from #6445 on top of #7282 

**Changes**

- [x] Bound `Invulnerables`, vector of validators invulnerable to
slashing.
- Add `MaxInvulnerables` to bound `Invulnerables` Vec -> `BoundedVec`.
- Set to constant 20 in the pallet (must be >= 17 for backward
compatibility with runtime `westend`).
- [x] Bound `Disabled Validators`, vector of validators that have
offended in a given era and have been disabled.
- Add `MaxDisabledValidators` to bound `DisabledValidators` Vec ->
`BoundedVec`.
- Set to constant 100 in the pallet (it should be <= 1/3 *
`MaxValidatorsCount` according to the current disabling strategy).
- [x] Remove `ErasStakers` and `ErasStakersClipped` (see #433 ),
non-paged validators exposures.
- They were deprecated in v14 and could have been removed since staking
era 1504 (now it's > 1700).
    - They are already empty on Polkadot and Kusama.
    - Completing the task from #5986.

Migrating pallet `staking` storage to v17 to apply all changes.  

**TO DO** (in a follow-up PR)
- [ ] Bound `ErasStakersPaged`
    - this needs bounding `ExposurePage.others` vector
- [ ] Bound `BondedEras` vector
- [ ] Bound `ClaimedRewards` pages vector
- [ ] Bound `ErasRewardPoints`
    - this needs bounding `EraRewardPoints.individual` BTreeMap 
- [ ] Bound `UnappliedSlashes`
- [ ] Bound `SlashingSpans` 
    - this needs bounding `SlashingSpans.prior` vector

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: kianenigma <kian@parity.io>
@Ank4n Ank4n closed this Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracker issue for cleaning up old non-paged exposure logic in staking pallet

1 participant