-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Better identifier and logging for runtime upgrades #8123
Conversation
Co-authored-by: Alexander Popiak <[email protected]>
Co-authored-by: Alexander Popiak <[email protected]>
…' of github.com:paritytech/substrate into kiz-finally-finally-finally-finally-migration-testing-2
|
I don't think you need an additional identifier here. |
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
|
Will remove the Identifier, I also noticed that it is optional at least as far as this PR goes. |
…ate into kiz-migration-testin-2
|
Now the per-pallet |
This is no longer relevant. In the past I made a new proc macro the get the create name from the carg file and use that for logging, now I use |
bkchr
left a comment
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.
Some last questions :D
| "pallet-society/std", | ||
| "pallet-recovery/std", | ||
| "pallet-vesting/std", | ||
| "frame-try-runtime/std", |
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.
yes this is needed because otherwise we can't compile node-runtime with try-runtime features and std :-/
the unused dependency on std should harm to much, and this is what we do for frame-benchmarking.
bkchr
left a comment
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'm still not happy with bincode, but fine ;D
|
bot merge |
|
Waiting for commit status. |
|
Checks failed; merge aborted. |
|
bot merge |
|
Trying merge. |
* A clean new attempt * Checkpoint to move remote. * A lot of dependency wiring to make it feature gated. * bad macro, bad macro. * Undo the DB mess. * Update frame/support/src/traits.rs Co-authored-by: Alexander Popiak <[email protected]> * Apply suggestions from code review Co-authored-by: Alexander Popiak <[email protected]> * unbreak the build * Better logging and ids for migrations * Fix doc. * Test * Update frame/try-runtime/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * Update utils/frame/try-runtime/cli/Cargo.toml Co-authored-by: Shawn Tabrizi <[email protected]> * Update frame/try-runtime/Cargo.toml Co-authored-by: Shawn Tabrizi <[email protected]> * Address most review grumbles. * Fix build * Add some comments * Remove allowing one pallet at a time. * Rework the PR * nit * Slightly better error handling. * Remove files * Update utils/frame/remote-externalities/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> * Update frame/support/src/dispatch.rs * Update frame/support/src/dispatch.rs * Fix test * Make extension trait. * Bring back try-runtime/std * remove bincode * Remove warning * Change test features Co-authored-by: Alexander Popiak <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]>
This builds on top of #8038 and assigns a unique ID to each
OnRuntimeUpgrade, which is used for two purposes:pre-upgrade/post-upgrade. I don't have an example of this yet in substrate, see an example here: paritytech/polkadot@146f1e2#diff-db5840c3c03c740de25aed56b9257559c224a04619c079c94cddbb23f9a855a4R1007The use case is that we want to write some data in pre-migration and read it back in post migration. This storage key facilitates that.
I've made the assumption again that each crate has one pallet only.