Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit OpenGov Delegation Info #5272

Merged
merged 18 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/js-delegation-allTracks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/js-delegation-delegate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/js-delegation-start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/js-delegation-undelegate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/js-delegation-undelegated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/js-delegation-unlock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 104 additions & 42 deletions docs/learn/learn-guides-polkadot-opengov.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,105 @@ This page is for advanced users of Polkadot OpenGov. If you would learn about an
OpenGov, please navigate to the page on
[participating in Polkadot Opengov.](https://wiki.polkadot.network/docs/maintain-guides-polkadot-opengov)

## Delegations

### Delegate Votes

You can start delegating your votes by clicking the "Delegate" button on
[Governance > Referenda](https://polkadot.js.org/apps/#/referenda).

![js-delegation-start](../assets/js-delegation-start.png)

If it is the first time you delegate or vote, there will be a banner message. You can delegate
single tracks or all the tracks. You can specify the number of votes (i.e., the number of tokens)
and the [conviction multiplier](./learn-polkadot-opengov.md#voluntary-locking). After clicking
"Next", you will need to specify the account to delegate your votes to, and after clicking
"Delegate" and "Sign and Submit" your delegations will appear for each track (see below).
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

![js-delegation-allTracks](../assets/js-delegation-allTracks.png)

Note that if you want to delegate just a few tracks, you have two options:

- Repeat the process through the "Delegate" tab multiple times
- Issues a batch call with multiple `convictionVoting.delegate` extrinsics under
[Developer > Extrinsics](https://polkadot.js.org/apps/#/extrinsics)
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved

![js-delegation-delegate](../assets/js-delegation-delegate.png)

By clicking on "Add item" you can add new extrinsics for multiple tracks.

### Undelegate Votes

The "Delegate" button on [Governance > Referenda](https://polkadot.js.org/apps/#/referenda) is only
for delegate votes. You cannot undelegate or modify your delegations. If you wish to undelegate, you
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
will need to go to [Developer > Extrinsics](https://polkadot.js.org/apps/#/extrinsics) and submit a
`convictionVoting.undelegate` extrinsic, specifying the track you wish to undelegate.

![js-delegation-undelegate](../assets/js-delegation-undelegate.png)

Undelegated tracks will show up as "0 votes" on the Delegate tab.

![js-delegation-undelegate](../assets/js-delegation-undelegated.png)

After you undelegated, the conviction lock will start the countdown, and your funds will be
available for unlocking after the countdown ends.

### Unlock Expired ConvictionVoting Locks

After the conviction lock expires, you can go to
[Developer > Extrinsics](https://polkadot.js.org/apps/#/extrinsics) and submit a
`convictionVoting.unlock` extrinsic to unlock funds for a specific track. Note that if you delegated
multiple tracks, the funds will be unlocked after undelegating all the tracks.

![js-delegation-unlock](../assets/js-delegation-unlock.png)

### Modify your Delegations

The "Delegate" on [Governance > Referenda](https://polkadot.js.org/apps/#/referenda) is only for
delegate votes. You cannot undelegate or modify your delegations. If you wish to update the
filippoweb3 marked this conversation as resolved.
Show resolved Hide resolved
delegated account, the conviction, and the number of votes you will need to go to
[Developer > Extrinsics](https://polkadot.js.org/apps/#/extrinsics), [undelegate](#undelegate-votes)
the track and [delegate](#delegate-votes) again with updated information.

## Claiming OpenGov Deposits

### Claiming the Preimage and Decision Deposits

After a referendum finishes its life cycle (and gets approved or rejected or timed out), the
preimage and decision deposits can be claimed. For claiming the preimage deposit, navigate to
[Polkadot-JS UI > Governance > Preimages](https://polkadot.js.org/apps/#/preimages) and click on
unnote button shown on the preimage you submitted.

![Claim Preimage Deposit](../assets/claim-preimage-deposit.png)

Similarly, to claim the decision deposit, navigate to
[Polkadot-JS UI > Governance > Referenda](https://polkadot.js.org/apps/#/referenda) and scroll down
to the end of the page to click on the referenda with the decision deposit and claim it.

![Claim Referendum Deposits](../assets/claim-referendum-decision-deposit.png)

### Claiming the Referendum Submission Deposit

The submission deposit for a referendum can be claimed
[only if the referendum was `Approved` or `Canceled`](https://github.com/paritytech/polkadot-sdk/blob/cfb29254f74412cea35e8048d8aea94bc789fcb1/substrate/frame/referenda/src/types.rs#L261).
The submission deposit can be claimed by issuing the `refundSubmissionDeposit` extrinsic.

Users can not refund their submission deposit while the referendum is `Ongoing` or `Rejected`.
Similarly, users cannot refund their submission deposit if the proposal has `TimedOut` (failing to
submit the decision deposit within a
{{ polkadot: <RPC network="polkadot" path="const.referenda.undecidingTimeout" defaultValue={201600} filter="blocksToDays"/> :polkadot }}{{ kusama: <RPC network="kusama" path="const.referenda.undecidingTimeout" defaultValue={201600} filter="blocksToDays"/> :kusama }}-day
period will lead to a referendum timeout). This behavior exists so that users can refrain from
spamming the chain with proposals that have no interest from the community. If a proposal is in the
`TimedOut` state, any user can call `slash_proposal_deposit`, which will move the funds from the
user to a runtime-configured account, like the treasury.

To refund your slashed deposit, you can start a new referendum and specifically request a refund
from the treasury. You need to make sure you have enough balance for a new submission and decision
deposit, and you will need to select the right track to ask for a refund. For example, the
[Small Tipper Track](../maintain/maintain-guides-polkadot-opengov.md#small-tipper) would be fine for
any kind of deposit refund up to
{{ polkadot: 250 DOT :polkadot }}{{ kusama: 8.25 KSM KSM :kusama }}.

## Cancel or Kill a Referendum

:::info
Expand All @@ -27,11 +126,11 @@ attain

:::

To cancel a referendum, you need first to submit a preimage with the `referenda.cancel` extrinsic. Go to the
[Polkadot-JS UI > Governance > Referenda](https://polkadot.js.org/apps/#/referenda) and click on the
"Add Preimage" button. You must specify
the `referenda.cancel` extrinsic with the index equal to the ongoing Referendum you wish to cancel.
In the screenshot below, the Referendum to be cancelled is 249.
To cancel a referendum, you need first to submit a preimage with the `referenda.cancel` extrinsic.
Go to the [Polkadot-JS UI > Governance > Referenda](https://polkadot.js.org/apps/#/referenda) and
click on the "Add Preimage" button. You must specify the `referenda.cancel` extrinsic with the index
equal to the ongoing Referendum you wish to cancel. In the screenshot below, the Referendum to be
cancelled is 249.

![cancel-referenda-preimage-creation](../assets/cancel-referenda-preimage-creation.png)

Expand Down Expand Up @@ -73,40 +172,3 @@ within the track, and a
have been met. Failing to submit the decision deposit within a
{{ polkadot: <RPC network="polkadot" path="consts.referenda.undecidingTimeout" defaultValue={201600} filter="blocksToDays"/> :polkadot }}{{ kusama: <RPC network="kusama" path="consts.referenda.undecidingTimeout" defaultValue={201600} filter="blocksToDays"/> :kusama }}-day
period will lead to a referendum timeout.

## Claiming the Preimage and Decision Deposits

After a referendum finishes its life cycle (and gets approved or rejected or timed out), the
preimage and decision deposits can be claimed. For claiming the preimage deposit, navigate to
[Polkadot-JS UI > Governance > Preimages](https://polkadot.js.org/apps/#/preimages) and click on
unnote button shown on the preimage you submitted.

![Claim Preimage Deposit](../assets/claim-preimage-deposit.png)

Similarly, to claim the decision deposit, navigate to
[Polkadot-JS UI > Governance > Referenda](https://polkadot.js.org/apps/#/referenda) and scroll down
to the end of the page to click on the referenda with the decision deposit and claim it.

![Claim Referendum Deposits](../assets/claim-referendum-decision-deposit.png)

## Claiming the Referendum Submission Deposit

The submission deposit for a referendum can be claimed
[only if the referendum was `Approved` or `Canceled`](https://github.com/paritytech/polkadot-sdk/blob/cfb29254f74412cea35e8048d8aea94bc789fcb1/substrate/frame/referenda/src/types.rs#L261).
The submission deposit can be claimed by issuing the `refundSubmissionDeposit` extrinsic.

Users can not refund their submission deposit while the referendum is `Ongoing` or `Rejected`.
Similarly, users cannot refund their submission deposit if the proposal has `TimedOut` (failing to
submit the decision deposit within a
{{ polkadot: <RPC network="polkadot" path="consts.referenda.undecidingTimeout" defaultValue={201600} filter="blocksToDays"/> :polkadot }}{{ kusama: <RPC network="kusama" path="consts.referenda.undecidingTimeout" defaultValue={201600} filter="blocksToDays"/> :kusama }}-day
period will lead to a referendum timeout). This behavior exists so that users can refrain from
spamming the chain with proposals that have no interest from the community. If a proposal is in the
`TimedOut` state, any user can call `slash_proposal_deposit`, which will move the funds from the
user to a runtime-configured account, like the treasury.

To refund your slashed deposit, you can start a new referendum and specifically request a refund
from the treasury. You need to make sure you have enough balance for a new submission and decision
deposit, and you will need to select the right track to ask for a refund. For example, the
[Small Tipper Track](../maintain/maintain-guides-polkadot-opengov.md#small-tipper) would be fine for
any kind of deposit refund up to
{{ polkadot: 250 DOT :polkadot }}{{ kusama: 8.25 KSM KSM :kusama }}.
6 changes: 3 additions & 3 deletions docs/learn/learn-polkadot-opengov.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,9 @@ For more information about how to submit a whitelisted proposal see the

### Becoming a Polkadot Technical Fellowship Member

Currently, the only way to become a fellowship member is through a referenda. To get added as a
member of "Rank 1", an existing member of the fellowship needs to submit a referendum with the preimage of a
batch call that has `fellowshipCollective.addMember` and
Currently, the only way to become a fellowship member is through a referenda. To get added as a
member of "Rank 1", an existing member of the fellowship needs to submit a referendum with the
preimage of a batch call that has `fellowshipCollective.addMember` and
`fellowshipCollective.promoteMember` on "2/Proficients" track. On Polkadot-JS UI for Polkadot
Collectives, navigate to Governance > Fellowship > Referenda and click on "Add Preimage". This
preimage can be submitted by anyone.
Expand Down
8 changes: 5 additions & 3 deletions docs/learn/learn-proxies-pure.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,11 @@ and then the old multisig can be removed as a proxy.
![multisig with pure](../assets/multisig-with-pure.png)

Compared to [Scenario Two](#scenario-two-multisig-made-of-pure-proxies), signatories do not need to
create pure proxies here. Multisig controlling a Pure Proxy is a more practical solution, where the signatories, number of signatories and/or the threshold can be changed, which changes the multisig address but does not impact the pure proxy address. In Scenario Two, if signatories behind the pure proxies change,
the address of the multisig stays the same. However, changing the number of signatories and
threshold would not be possible.
create pure proxies here. Multisig controlling a Pure Proxy is a more practical solution, where the
signatories, number of signatories and/or the threshold can be changed, which changes the multisig
address but does not impact the pure proxy address. In Scenario Two, if signatories behind the pure
proxies change, the address of the multisig stays the same. However, changing the number of
signatories and threshold would not be possible.

## Proxy calls

Expand Down
10 changes: 8 additions & 2 deletions polkadot-wiki/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ module.exports = {
link: {
type: 'generated-index',
title: 'Advanced Guides',
description: 'Advanced how-to guides.',
description: 'Advanced how-to guides using the Polkadot-JS User Interface.',
slug: '/learn-guides-index',
},
items: [
Expand Down Expand Up @@ -657,8 +657,14 @@ module.exports = {
type: "category",
label: "Governance Guides",
items: [
"maintain/maintain-guides-democracy",
"maintain/maintain-guides-polkadot-opengov",
],
},
{
type: "category",
label: "Archive",
items: [
"maintain/maintain-guides-democracy",
"maintain/maintain-guides-how-to-join-council",
"maintain/maintain-guides-how-to-vote-councillor",
],
Expand Down
Loading