Skip to content

Commit

Permalink
Move Democracy Content (#5752)
Browse files Browse the repository at this point in the history
* move content

* edited subtitles

* Update docs/learn/learn-runtime-upgrades.md

---------

Co-authored-by: Radha <[email protected]>
  • Loading branch information
filippoweb3 and DrW3RK authored Apr 3, 2024
1 parent 5e74126 commit 868a305
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
22 changes: 22 additions & 0 deletions docs/learn/archive/learn-governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,28 @@ case for why the change should be made.

:::

## Gov1 Runtime Upgrade Monitoring

Monitor the chain for:

1. `democracy(Started)` events and log `index` and `blockNumber`. This event indicates that a
referendum has started (although it does not mean it is a runtime upgrade). Get the referendum
info\*; it should have a status of `Ongoing`. Find the ending block number (`end`) and the
enactment `delay` (delay). If the referendum passes, it will execute on block number
`end + delay`.
2. `democracy(Passed)`, `democracy(NotPassed)`, or, `democracy(Cancelled)` events citing the index.
If `Passed`, you need to look at the `scheduler(Scheduled)` event in the same block for the
enactment block.
3. `democracy(PreimageNoted)` events with the same hash as the `ReferendumInfoOf(index)` item. This
may be up to the last block before execution, but it will not work if this is missing.
4. `democracy(Executed)` events for actual execution. In the case of a runtime upgrade, there will
also be a `system(CodeUpdated)` event.

You can also monitor [Polkassembly](https://polkadot.polkassembly.io/) for discussions on on-chain
proposals and referenda.

\* E.g. via `pallets/democracy/storage/ReferendumInfoOf?key1=index&at=blockNumber` on Sidecar.

## Resources

- [Initial Governance Description](https://github.com/paritytech/polkadot/wiki/Governance)
Expand Down
24 changes: 0 additions & 24 deletions docs/learn/learn-runtime-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,30 +128,6 @@ Polkadot Fellowship's
[runtime upgrades](https://github.com/polkadot-fellows/runtimes/releases/latest) to be aware of
changes in the runtime logic.

### Governance V1

Monitor the chain for:

1. `democracy(Started)` events and log `index` and `blockNumber`. This event indicates that a
referendum has started (although it does not mean it is a runtime upgrade). Get the referendum
info\*; it should have a status of `Ongoing`. Find the ending block number (`end`) and the
enactment `delay` (delay). If the referendum passes, it will execute on block number
`end + delay`.
2. `democracy(Passed)`, `democracy(NotPassed)`, or, `democracy(Cancelled)` events citing the index.
If `Passed`, you need to look at the `scheduler(Scheduled)` event in the same block for the
enactment block.
3. `democracy(PreimageNoted)` events with the same hash as the `ReferendumInfoOf(index)` item. This
may be up to the last block before execution, but it will not work if this is missing.
4. `democracy(Executed)` events for actual execution. In the case of a runtime upgrade, there will
also be a `system(CodeUpdated)` event.

You can also monitor [Polkassembly](https://polkadot.polkassembly.io/) for discussions on on-chain
proposals and referenda.

\* E.g. via `pallets/democracy/storage/ReferendumInfoOf?key1=index&at=blockNumber` on Sidecar.

### Polkadot OpenGov

Runtime upgrades are voted on and executed via [Polkadot OpenGov](./learn-polkadot-opengov.md). You
should monitor the Relay Chain as follows to know when the next runtime upgrade will be enacted:

Expand Down

0 comments on commit 868a305

Please sign in to comment.