1

We are maintaining a blockchain based on substrate node tag v3.0.0. Now we upgraded to substrate branch polkadot-v0.9.27. (We need to upgrade to support native smart contracts with Ink! with the last tools versions).

The forkless upgrade fails, because the new RuntimeVersion structure seems to be different. The error we are getting is: system.FailedToExtractRuntimeVersion.

Any advice if it is possible to upgrade (node & runtime) with this changes, or there are another way of starting up a new version and migrating old chain data to the new version?

Thanks very much.

For reference, original version is based on: https://github.com/paritytech/substrate/tree/v3.0.0

and the new version: https://github.com/paritytech/substrate/tree/polkadot-v0.9.27

1 Answer 1

0

Method 1: You can just do the runtime upgrade and just change the old binary with new one using the same customSpecRaw.json, you need to do the changes in the new version.

Method 2: Run the new version and do the storage migration for this you can refer How to selectively populate state from a snapshot of one chain onto another?

3
  • Thanks very much for the answer. For Method 1, I don´t understand how to keep the current chain state. I just have the glitch_runtime.compact.wasm for the forkless upgrade. If I change it in the customSpeckRaw.json the chain history will be lost right? Thanks! Commented Dec 27, 2022 at 13:51
  • Sorry, and the 'you need to do the changes in the new version' what means, if you please can elaborate on this. Thanks very much. Commented Dec 27, 2022 at 14:15
  • For method one you don't need to change the customSpecRaw.json, just do the runtime upgrade and replace the client or in other words the binary of the new version with old, you don't need to run the chain again just use the old --base-path where the db, keystore and network are already present, with old customSpecRaw.json. Hope this explains how to do it. Commented Dec 28, 2022 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.