substrate icon indicating copy to clipboard operation
substrate copied to clipboard

Bound Election and Staking by MaxActiveValidators

Open Ank4n opened this issue 2 years ago • 10 comments

This PR will bound pallet-stakingwith MaxActiveValidators. It is part of an ongoing effort towards bounding all pallet-staking storage items. https://github.com/paritytech/substrate/issues/12187.

  • Add BoundedSupports.
  • Introduce MaxWinners to ElectionProvider that bounds the maximum winners that can be elected for an election.
  • Ensure pallet-staking (ElectionDataProvider) never asks for desired_targets higher than MaxWinners. This ensures offchain miner does not need any changes to stay compatible with the new code.

Polkadot companion: https://github.com/paritytech/polkadot/pull/6157

Ank4n avatar Oct 06 '22 12:10 Ank4n

bot rebase

Ank4n avatar Oct 07 '22 13:10 Ank4n

Rebased

bot rebase

Ank4n avatar Oct 07 '22 23:10 Ank4n

Rebased

bot rebase

Ank4n avatar Oct 11 '22 11:10 Ank4n

Rebased

bot rebase

Ank4n avatar Oct 13 '22 14:10 Ank4n

Rebased

bot rebase

Ank4n avatar Oct 14 '22 20:10 Ank4n

Rebased

bot rebase

Ank4n avatar Oct 18 '22 19:10 Ank4n

Rebased

bot merge

Ank4n avatar Nov 09 '22 09:11 Ank4n