-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reset crowdloan rewards storage in Moonbase runtime only. #710
Conversation
// Delete all crowdlaon rewards storage | ||
// Supply only the pallet name, no storage item name or map key | ||
// This will cause the entire pallet's storage to be deleted | ||
frame_support::storage::migration::remove_storage_prefix(b"CrowdloanRewards", &[], &[]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea what the ramifications of this are on storage proof size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to know what was stored there in order to delete it. So I think the storage proof will just need to contain sibling nodes down to the root of this pallet so they can calculate the correct post-state root.
I'm not that confident that I'm right, but that makes sense to me.
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
// Delete all crowdlaon rewards storage | ||
// Supply only the pallet name, no storage item name or map key | ||
// This will cause the entire pallet's storage to be deleted | ||
frame_support::storage::migration::remove_storage_prefix(b"CrowdloanRewards", &[], &[]); |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
I think we cannot delete all storage items (more than 12K) at once due to weight constrains. KillPrefix only allowed me to remove 4000 items at most, |
I'm going to close this for now. If we want it or something like it we can re-open or open a new one. |
This PR adds a runtime migration to the moonbase runtime that will delete all of pallet crowdloan rewards' storage so it can be re-initialized.