28 lines
991 B
Markdown
28 lines
991 B
Markdown
# How to do a runtime upgrade
|
|
|
|
- You need to poses the sudo keys for the chain
|
|
- Make sure the runtime spec_version is incremented
|
|
- You need to compile the newest chain. A `cargo clean` before that would be advisable.
|
|
```shell
|
|
cargo clean
|
|
```
|
|
```shell
|
|
cargo build --release
|
|
```
|
|
- You need to call the sudo.sudo(call) on system.setCode(code) extrinsic with the sudo keys
|
|
|
|
`sudo.sudo(system.setCode(your_chain.compact.compressed.wasm)) `
|
|
|
|
- As the "code" argument you need to upload the `g6_solo_runtime.compact.compressed.wasm` from the target folder `target/release/wbuild/g6-solo-runtime/`
|
|
|
|

|
|
|
|
- To confirm the upgrade was successful you should see the new spec_version in the PJS UI top left
|
|
|
|
Eg. before: `g6-solo-chain/102`. After `g6-solo-chain/103`
|
|
|
|

|
|
|
|
## More info
|
|
https://docs.polkadot.com/develop/parachains/maintenance/runtime-upgrades/
|