-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
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) and 8522 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#L155
Definition of zero record for ClassLocksFor - https://github.com/muharem/polkadot-runtimes/blob/8f2deec8afa1384c56bd3795c6fa3e3e098b02f7/pallets/rc-migrator/src/conviction_voting.rs#L125
Note 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.