Skip to content

Tutorial: How to use Governance to do runtime upgrade

AdiosXia edited this page Jul 30, 2021 · 1 revision
  1. Start a dev substrate chain as an experiment environment.

  2. Go to Page Governance -Democracy, and submit a new preimage. Do this the same when we try in https://github.com/Manta-Network/Manta/wiki/How-to-do-runtime-upgrade-for-calamari. Update the wasm file here

  1. Go the block explore, find the successful preimage submission. Copy the hash for the next step

  1. Submit a proposal for a runtime upgrade. Copy the hash code in there.

  1. You will see the proposal under the box. Click Seconds button to second this proposal. This will elevate his priority to be dealt with by the committee sooner.

  1. Wait for this launch period to end, you can change this time parameter in the code here: substrate/bin/node/runtime/src/lib.rs. Then our proposal will go into referenda. Then you can vote for it.

Any super user's vote will go directly through the proposal. Vote for it and then you will see it:

  1. Democracy use pallet-schedule to do runtime upgrade. In activate part, you can see how long this preimage will be executed. After this vote end, you can see this proposal on the dispatch page.

Wait for a long time and you will see the runtime upgrade successfully.