-
Notifications
You must be signed in to change notification settings - Fork 14
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
Rework migration and on runtime upgrade logic execution #1315
base: master
Are you sure you want to change the base?
Conversation
3323773
to
2cb6dc3
Compare
10f7009
to
ab80d9c
Compare
ab80d9c
to
48a39c7
Compare
0af952a
to
b78da82
Compare
crates/pallet-balanced-currency-swap-bridges-initializer/src/tests.rs
Outdated
Show resolved
Hide resolved
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.
Please explain the logic behind this change - in particular why alter all the pallets
Added to the description |
05b4304
to
c5d8330
Compare
We'd have to put this on hold for now, a I need to do more research on this and dig deeper to really conclude something propely; note there are no useless migrations, and, in principle, migrations are to be kept forever; unless there is a special certain cutoff date for them. |
Got it. The PR is not about avoiding having useless migrations, but to make the migrations itself more flexible. We can always have it at runtime level to keep it forever but control all migrations in one place. Btw, looking forward to doing more research on your side and discussing later. I just was inspired by the general logic of custom upgrades usage after researching substrate updates related to |
e14e9b8
to
9ff37a1
Compare
The main goal of this PR is to avoid running runtime upgrade execution for each pallet on each runtime upgrade. The idea is taken from
substrate
andpolkadot-sdk
approach to use an ability passing actual migration at the runtime itself.There are introduced separate objects responsible for runtime upgrade logic that implement
OnRuntimeUpgrade
to be passed athumanode-runtime
toExecutive
like: