mirror of
https://github.com/pezkuwichain/pezkuwi-fellows.git
synced 2026-05-31 10:31:06 +00:00
deploy: 91b31618c4
This commit is contained in:
@@ -247,8 +247,10 @@
|
||||
<p><code>Technical Writers</code>: This change will require rewrites of documentation and tutorials. </p>
|
||||
<h2 id="explanation"><a class="header" href="#explanation">Explanation</a></h2>
|
||||
<h3 id="new-data--runtime-logic"><a class="header" href="#new-data--runtime-logic">New Data & Runtime Logic</a></h3>
|
||||
<p>The <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/vote.rs#L225">Voting Enum</a> is first collapsed, as there's no longer a distinction between the variants. Then a <code>(poll index -> retracted votes count)</code> data item would be added to the user's voting data stored in <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/lib.rs#L165">VotingFor</a>. This would keep track of the per poll balance that has been clawed back from the user by those delegating to them. </p>
|
||||
<p>All changes to pallet-conviction-voting's STF would follow that simple change. For example, when a user votes standard, the final amount added to the poll's tally will be <code>balance + (amount delegated to user - retracted votes)</code>. Then, if they are delegating, it will update their delegate's vote data with the newly retracted votes.</p>
|
||||
<p>The <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/vote.rs#L225">Voting Enum</a> is first collapsed, as there's no longer a distinction between the variants. Then a <code>(poll index -> retracted votes count)</code> data item would be added to the user's voting data stored in <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/lib.rs#L165">VotingFor</a>. This would keep track of the per poll balance that has been clawed back from the user by those delegating to them.</p>
|
||||
<p>The implementation must allow for the <code>(poll index -> retracted votes)</code> data to exist even if the user does not currently have a vote for that poll. A simple example that highlights the necessity is as follows: A delegator votes first, then the delegate does. If the delegator is not allowed to create the retracted votes data on the delegate, the tally count would be corrupted when the delegate votes.</p>
|
||||
<p>It follows then that the delegator must also handle clean up of that data when their vote is removed. Otherwise, the delegate has no immediate monetary incentive to clean the retracted votes state.</p>
|
||||
<p>All changes to pallet-conviction-voting's STF would follow those simple changes. For example, when a user votes standard, the final amount added to the poll's tally will be <code>balance + (amount delegated to user - retracted votes)</code>. Then, if they are delegating, it will update their delegate's vote data with the newly retracted votes.</p>
|
||||
<p>The retracted amount is always the full delegated amount. For example, if Alice delegates 10 UNITS to Bob and then votes with 5 UNITS, the full 10 UNITS is still added as a clawback to Bob for that poll. This is both for simplicity and to ensure we don't make unnecessary assumptions about what Alice wants.</p>
|
||||
<p>Because you need to add the clawback, a delegator's vote can affect a delegate's voting data. If a delegator's vote or delegation makes the delegate's voting data exceed <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/vote.rs#L206-L216">MaxVotes</a>, the transaction will fail. In practice, this means this new system is somewhere between the old and the ideal. However, this will incentivize delegates to stay on top of voting data clearance. And given our current referenda rates and MaxVotes set to <a href="https://github.com/polkadot-fellows/runtimes/blob/main/relay/polkadot/src/governance/mod.rs#L43">512</a>, it would be difficult to hit this limit.</p>
|
||||
<p>A new error is to be introduced that signals MaxVotes was reached specifically for the delegate's voting data.</p>
|
||||
|
||||
+4
-2
@@ -253,8 +253,10 @@ detailing proposed changes to the technical implementation of the Polkadot netwo
|
||||
<p><code>Technical Writers</code>: This change will require rewrites of documentation and tutorials. </p>
|
||||
<h2 id="explanation"><a class="header" href="#explanation">Explanation</a></h2>
|
||||
<h3 id="new-data--runtime-logic"><a class="header" href="#new-data--runtime-logic">New Data & Runtime Logic</a></h3>
|
||||
<p>The <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/vote.rs#L225">Voting Enum</a> is first collapsed, as there's no longer a distinction between the variants. Then a <code>(poll index -> retracted votes count)</code> data item would be added to the user's voting data stored in <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/lib.rs#L165">VotingFor</a>. This would keep track of the per poll balance that has been clawed back from the user by those delegating to them. </p>
|
||||
<p>All changes to pallet-conviction-voting's STF would follow that simple change. For example, when a user votes standard, the final amount added to the poll's tally will be <code>balance + (amount delegated to user - retracted votes)</code>. Then, if they are delegating, it will update their delegate's vote data with the newly retracted votes.</p>
|
||||
<p>The <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/vote.rs#L225">Voting Enum</a> is first collapsed, as there's no longer a distinction between the variants. Then a <code>(poll index -> retracted votes count)</code> data item would be added to the user's voting data stored in <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/lib.rs#L165">VotingFor</a>. This would keep track of the per poll balance that has been clawed back from the user by those delegating to them.</p>
|
||||
<p>The implementation must allow for the <code>(poll index -> retracted votes)</code> data to exist even if the user does not currently have a vote for that poll. A simple example that highlights the necessity is as follows: A delegator votes first, then the delegate does. If the delegator is not allowed to create the retracted votes data on the delegate, the tally count would be corrupted when the delegate votes.</p>
|
||||
<p>It follows then that the delegator must also handle clean up of that data when their vote is removed. Otherwise, the delegate has no immediate monetary incentive to clean the retracted votes state.</p>
|
||||
<p>All changes to pallet-conviction-voting's STF would follow those simple changes. For example, when a user votes standard, the final amount added to the poll's tally will be <code>balance + (amount delegated to user - retracted votes)</code>. Then, if they are delegating, it will update their delegate's vote data with the newly retracted votes.</p>
|
||||
<p>The retracted amount is always the full delegated amount. For example, if Alice delegates 10 UNITS to Bob and then votes with 5 UNITS, the full 10 UNITS is still added as a clawback to Bob for that poll. This is both for simplicity and to ensure we don't make unnecessary assumptions about what Alice wants.</p>
|
||||
<p>Because you need to add the clawback, a delegator's vote can affect a delegate's voting data. If a delegator's vote or delegation makes the delegate's voting data exceed <a href="https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/conviction-voting/src/vote.rs#L206-L216">MaxVotes</a>, the transaction will fail. In practice, this means this new system is somewhere between the old and the ideal. However, this will incentivize delegates to stay on top of voting data clearance. And given our current referenda rates and MaxVotes set to <a href="https://github.com/polkadot-fellows/runtimes/blob/main/relay/polkadot/src/governance/mod.rs#L43">512</a>, it would be difficult to hit this limit.</p>
|
||||
<p>A new error is to be introduced that signals MaxVotes was reached specifically for the delegate's voting data.</p>
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user