Empty storage entries in conviction-voting pallet #7458
Labels
C1-mentor
A task where a mentor is available. Please indicate in the issue who the mentor could be.
C2-good-first-issue
A task for a first time contributor to become familiar with the Polkadot-SDK.
Context
After inspecting the Polkadot storage snapshot from January 17, 2025, I found
20575
VotingFor
records with zero capital (zero-balance votes, no delegations, no prior locks) and8522
ClassLocksFor
entries with zero-balance locks. These records likely serve no purpose and should not be stored.Definition of zero record for
VotingFor
- https://github.com/muharem/polkadot-runtimes/blob/8f2deec8afa1384c56bd3795c6fa3e3e098b02f7/pallets/rc-migrator/src/conviction_voting.rs#L155Definition of zero record for
ClassLocksFor
- https://github.com/muharem/polkadot-runtimes/blob/8f2deec8afa1384c56bd3795c6fa3e3e098b02f7/pallets/rc-migrator/src/conviction_voting.rs#L125Note that a zero vote perhaps should still be possible if an account has delegations and to vote using only those delegations.
Task
Verify or refute the findings above. If the issue is present, prevent the creation of such records and implement a migration or a call to remove them from storage.
The text was updated successfully, but these errors were encountered: