Open kianenigma opened 2 years ago
Hello @kianenigma I'd like to keep working on MaxActiveValidators
with guidance from you or anyone from your team.
As for the trivial ones, I'll look into that as well if that's alright with you.
Hello @kianenigma I'd like to keep working on
MaxActiveValidators
with guidance from you or anyone from your team.
Then you can close the existing PRs, and build on top of https://github.com/paritytech/substrate/commit/4682f3fbda7bce7e45d8efa06e5817e93368e3d8, thanks!
@Doordashcon please note that @Ank4n will be looking into HistoryDepth
and generally push forward this tracking issue.
Dropping this
This should be done as a part of https://github.com/paritytech/polkadot-sdk/issues/2199.
@Ank4n @gpestana please double-check that the above assumption is true. In this case, I don't see any room for mentoring here anymore.
Updated list of unbounded storage items
ErasStakers
. Handled in https://github.com/paritytech/polkadot-sdk/pull/5986.MaxNominatorsCount
/page_size.ValidatorCount
.ValidatorCount
.Lot of the bounds that we need are storage items. We should probably convert them to config constants.
related to https://github.com/paritytech/polkadot-sdk/issues/323 and https://github.com/paritytech/substrate/issues/9724
If we simply remove the
pallet::without_storage_info
, we get an error about the following items:Full Errors
``` error[E0277]: the trait bound `std::vec::Vec<Invulnerables
StakingLedger
Payee
Validators
/ValidatorPrefs
Nominators
/Nominations
ErasStakers
/ErasStakersClipped
/Exposure
ActiveEraInfo
ErasRewardPoints
Forcing
UnappliedSlashes
BondedEras
SlashingSpans
OffendingValidators
Releases
I categorize these into 4 groups:
derive(MaxEncodedLen)
. This list includes:HistoryDepth
. This includes onlyStakingLedger
. Also, a number of storage maps and double maps have an invariant that the number of their keys should never exceedHistoryDepth
. We should detect these, and make sure they are always respected (usetry_state
).MaxActiveValidators
. These are storage item who's bound is missing because we don't enforce a bound on the maximum number of active validators.election-provider-mutli-phase
, and staking would express: typeElectionProvider<MaxWinners = Self::MaxActiveValidators>
MaxBackersPerWinner
. @ggwpez started doing this in paritytech/substrate#11935, we need someone to finish it.So, these are the bounds we know:
MaxActiveValidators
:Invulnerables
ErasRewardPoints
MaxBackersPerWinner
ErasStakers
/ErasStakersClipped
/Exposure
HistoryDepth
StakingLedger
ActiveEraInfo
Forcing
Payee
Validators
/ValidatorPrefs
Nominators
/Nominations
-Releases
UnappliedSlashes
BondedEras
SlashingSpans
OffendingValidators
MaxActiveValidators
. I might prefer doing it myself since it is rather important and touches a few pallets. Nonetheless, I am grateful for @Doordashcon's effort here so far and will acknowledge it.MaxBackersPerWinner
needs completion by me and @ggwpez