substrate
substrate copied to clipboard
Improving try state running time for staking pallet
This should improve try state running time. We already check that VoterList::count == Nominators::count + Validators::count
in fn check_count()
which should give us sufficient safety as well as speed.
Should resolve https://github.com/paritytech/substrate/issues/13114. It took around 6 second for try staking test to run locally on my computer with polkadot runtime and state.
Note: The try state checks will fail on kusama runtime because of a corrupted ledger. I am following up with the team whose account is affected to get it fixed via governance.