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

Make custom on runtime upgrade prior to pallet ones #8687

Merged
1 commit merged into from
May 3, 2021

Conversation

gui1117
Copy link
Contributor

@gui1117 gui1117 commented Apr 28, 2021

Fix #8683

Breaking change:

All pallets runtime upgrade is now executed after the custom runtime upgrade provided to Executive.
(instead before, frame system pallet runtime upgrade was executed first).

Additional notes

This doesn't deprecated the runtime upgrade of pallets (though I'm also in favor of deprecating them). This can be done in another PR, easiest implementation is just to rename on_runtime_upgrade to deprecated_on_runtime_upgrade for pallet on runtime upgrade hook.

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Apr 28, 2021
@gui1117 gui1117 added B3-apinoteworthy C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Apr 28, 2021
@drewstone
Copy link
Contributor

Brilliant

@shawntabrizi
Copy link
Member

This doesn't deprecated the runtime upgrade of pallets (though I'm also in favor of deprecating them)

Yeah, we should do it.

@kianenigma
Copy link
Contributor

This doesn't deprecated the runtime upgrade of pallets (though I'm also in favor of deprecating them)

Yeah, we should do it.

So we want to push for only allowing updates being exposed from the pallet and manually added to the runtime?

This is much much better for the scenario of maintaining migration scripts, and potentially making them synced with the pallet version, I also prefer this.

If and when we do this, we should also wipe all the temporary storage items that we added for migration versioning and whatnut.

@gui1117
Copy link
Contributor Author

gui1117 commented May 3, 2021

bot merge

@ghost
Copy link

ghost commented May 3, 2021

Trying merge.

@ghost ghost merged commit bd8c1ca into master May 3, 2021
@ghost ghost deleted the gui-custom-on-runtime-upgrade-prior branch May 3, 2021 08:57
@apopiak
Copy link
Contributor

apopiak commented May 3, 2021

@sacha-l @jimmychu0807 We need to update substrate.dev accordingly. (here)

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

system on_runtime_upgrade should be triggered after custom on runtime upgrade, similarly to other pallet
5 participants