Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

propose removing all on_runtime_upgrade logic from the pallets and handling it directly at the runtime level #8713

Closed
gui1117 opened this issue May 3, 2021 · 2 comments · Fixed by #10650
Labels
Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Comments

@gui1117
Copy link
Contributor

gui1117 commented May 3, 2021

@bkchr proposed removing all on_runtime_upgrade logic from the pallets and handling it directly at the runtime level, which seems like a good option imo. That way a team can check the references and order however they please.

Originally posted by @drewstone in #8683 (comment)

Some hint for implementers:

  • remove the implementation of OnRuntimeUpgrade on the pallet in frame/support/procedural/src/pallet/expand.rs
  • remove the method on_runtime_upgrade, pre_upgrade, post_upgrade in the Hook trait in frame/support/src/traits/hooks.rs
  • modify the frame-executive:
    • do not require that AllPallets implement OnRuntimeUpgrade anymore
    • do not execute AllPallets::on_runtime_upgrade anymore.

That should be all I think.

@stale
Copy link

stale bot commented Jul 7, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 7, 2021
@kianenigma
Copy link
Contributor

I really agree with this. Handling migrations that are baked into the pallet is too opaque in my opinion.

@stale stale bot removed the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Sep 17, 2021
@gui1117 gui1117 added Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. labels Sep 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants