Clone node repo
Switch to the root directory of the cloned project
- Build the Wasm bytecode
cargo build --release
Go to Democracy page https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fwestlake.datahighway.com#/democracy
The first step is to submit a preimage of the proposal. Click on Submit preimage
Choose system as call and setCode as function
Click the code input field, and select the Wasm binary that defines the upgraded runtime:
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".
Important If you forgot to copy the preimage hash, you can easily regenerate and copy it again by choosing the same extrinsic (it won't allow to submit it again but you can get preimage hash).
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
Select the account to second the proposal
Verify the number of tokens required to second the proposal and Click the "Second" button and sign the transaction
Important By seconding a proposal you will move it higher up the rank of proposals. The most seconded proposal — in value, not number of supporters — will be brought to a referendum every launch period. If nobody seconds a proposal, it would still reach to referendum.
The most seconded proposal moves to public referendum
Once in referendum, token holders vote "Aye" or "Nay" on the proposal by locking tokens. Two factors account the vote weight: amount locked (i.e. conviction) and locking period
If the proposal passes, it is enacted after a certain amount of time
Important If referendum does not pass due to any reason (either nobody votes or more
Nay and less
Aye), you can re-submit proposal using same preimage hash.
- After the voting period has expired, the proposal will be visible under the "Dispatch" tab if approved.
After the dispatch period has expired, Runtime_upgrade will start and you can see upgraded version on top left corner.
Important: If you want to test locally, you may need to modify the current runtime configuration of democracy module such as Launch Period, EnactmentPeriod and Voting Period.