-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Better identifier and logging for runtime upgrades #8123
Conversation
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
…' 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 <bkchr@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
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 |
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
bin/node/runtime/Cargo.toml
Outdated
@@ -154,6 +154,7 @@ std = [ | |||
"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.
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 <alexander.popiak@parity.io> * Apply suggestions from code review Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * 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 <bkchr@users.noreply.github.com> * Update utils/frame/try-runtime/cli/Cargo.toml Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/try-runtime/Cargo.toml Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * 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 <bkchr@users.noreply.github.com> * 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 <alexander.popiak@parity.io> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
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.