13

I would like to upgrade my parachain.

What is the proper way of executing a runtime upgrade on a parachain?

Which RPC method to call?

Should this be applied to collators or rpc-nodes?

2 Answers 2

9

The flow of upgrading the runtime in a parachain can definitely be different from the the flow one can be used to when running a solo chain.

For this scenario what is recommended is following the authorize --> enact path.

Note that the relay chain needs to be informed of the runtime upgrade before it happens, and just after that you could enact the upgrade in your para.

Cumulus provides these functionality in through pallet cumulus-pallet-parachain-system :

Please, find more details on this how to guide

7

Just to add to the above answer: One good trick to providing the correct hash for authorizeUpgrade: you can select the "hash a file" option on the right and then pick a file on disk and it will compute the correct hash for you.

authoriseUpgrade

(but you do need to select the right file...)

3
  • but you do need to select the right file... -- This answer would be more usable if it explained which file to use...
    – Simson
    Oct 20, 2022 at 0:58
  • For upgrading common good parachains the runtime file is built and released in the cumulus github; for example here is the v9290 release: github.com/paritytech/cumulus/releases/tag/parachains-v9290 . Anyone can also build it themselves using the published docker image. Running github.com/chevdor/srtool-cli is the easiest way to do that.
    – Squirrel
    Nov 1, 2022 at 13:48
  • I think cargo build --release in the correct source tree is the easiest and safest way. Then just picking the correct artifact is the challenge.
    – Simson
    Nov 1, 2022 at 22:28

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.