-
Notifications
You must be signed in to change notification settings - Fork 91
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
Generic nuke migrations #1492
Generic nuke migrations #1492
Conversation
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.
The code LGTM! I was wondering though whether it was desired not to apply the migration to any runtime? Just realized this after I could not get any logs when running against Altair or Centrifuge.
I would merge after #1493 |
@wischli, yeah, it all depends on the chain state at the moment of the runtime upgrade (at least for |
If this migration is planned to be part of the next release, I would like to add it now as otherwise the verification of the correctness of the migration will only be done during release and not as part of this PR. I don't have a strong opinion about this. |
For me, the purpose of this PR is only to add this utility for future usage in a common place, without affecting any behavior. I can add a next PR with the required changes just after merging this in altair/centrifuge runtimes to remove old migrations and add this nuke migration to the required pallets for the next upgrade. WDYT? Just for splitting concerns in different PRs |
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.
Thanks for the conversation! Definitely in favor of splitting up PRs such that the addition to corresponding runtimes can be done in a subsequent PR.
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.
Re-approving
Description
This PR adds a nuke migration utility agnostic from any pallet to be used when we need to restore the storage of a pallet. Located in
runtime-common
.To nuke the migration of a pallet you need to add the following line (supposing we want to nuke
Loans
from on-chain version1
):This PR do not remove/add any runtime migration
Partial_fix #1461
Testing
Tested in Altair (previously modifying the runtime by adding this migration) with the following:
Done positive (when it works) & negative (when it shouldn't work) testing