Skip to main content

Runtime Upgrade

How to propose a forkless runtime upgrade#

Step 1: Prepare WASM binary#

  • Clone node repo

  • Switch to the root directory of the cloned project

cd node

  • Build the Wasm bytecode

cargo build --release

Step 2: Submit a Preimage Hash of the Proposal for a forkless runtime upgrade#

  • Go to Democracy page

  • The first step is to submit a preimage of the proposal. Click on Submit preimage

  • Choose sudo as extrinsic and select sudoUncheckedWeight as function

  • Choose system as call and setCode as function

  • Click the code input field, and select the Wasm binary that defines the upgraded runtime: target/release/wbuild/datahighway-runtime/datahighway_runtime.compact.wasm

  • Copy the preimage hash. This represents the proposal. You will use this hash when submitting the actual proposal.

  • Leave the value for the _weight parameter at the default of 0.

  • Click "Submit Transaction" and then "Sign and Submit".

Step 3: Submit the Proposal#

  • Select the account from which you want to submit the proposal.

  • Enter the preimage hash related to the proposal.

  • Set the locked balance.

  • Click the Submit proposal button and sign the transaction