Skip to content
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

Fix build for try-runtime feature #91

Merged
merged 1 commit into from
Jul 8, 2022
Merged

Conversation

0xrust
Copy link
Contributor

@0xrust 0xrust commented Jul 8, 2022

Try-runtime is a set of hooks that can be used to test storage migrations.

In order to test a migration one would have to:

  • Have a node setup up and running
  • The storage migration changes available in on_runtime_upgrade hook
  • The pre_upgrade and post_upgrade hooks implemented
  • Increase the chain spec version
  • Run cargo run --release --features=try-runtime try-runtime on-runtime-upgrade live --uri ws://localhost:9944 (with the real uri)

The pre_ and post_ are not meant to be used directly on the prod node, since failing the migration will terminate the node process. Instead, the hooks can be ran using the CLI above.

Certain Cargo.toml files must be modified in order to enable try-runtime feature for a new pallet, but only when needed, no pre-configuration must be done prior to that.

@mohamedelshami mohamedelshami merged commit 7e367c8 into main Jul 8, 2022
@0xrust 0xrust deleted the compile-try-runtime-fix branch July 11, 2022 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants