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?
Substrate and Polkadot Stack Exchange is a question and answer site for developers building blockchains with the Substrate SDK. It only takes a minute to sign up.
Sign up to join this communityThe 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
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.
(but you do need to select the right file...)
but you do need to select the right file...
-- This answer would be more usable if it explained which file to use...
cargo build --release
in the correct source tree is the easiest and safest way. Then just picking the correct artifact is the challenge.