Repository navigation
refactor(governance): NeuronSections no longer implements default. - #2470
Merged
daniel-wong-dfinity-org merged 4 commits intoNov 26, 2024
Merged
Conversation
This was referenced Nov 6, 2024
daniel-wong-dfinity-org
marked this pull request as ready for review
November 7, 2024 08:10
daniel-wong-dfinity-org
enabled auto-merge
November 8, 2024 13:59
max-dfinity
reviewed
Nov 8, 2024
max-dfinity
reviewed
Nov 13, 2024
max-dfinity
reviewed
Nov 13, 2024
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Nov 15, 2024
…voting power. (#2385) Whereas, before, we did not have a distinction between **potential** voting power vs. **deciding** voting power. When neurons refresh themselves, there is no difference between these. Whereas, when a neuron does not refresh itself recently enough, the amount of voting power in its ballots (its "deciding" voting power) is less than its potential voting power. # Example Suppose there are two neurons: * A has 100 potential voting power, and refreshed recently, and as a result, its deciding voting power is also 100. * B has 1000 potential voting power, but has not refreshed in a long time, and as a result, it's deciding voting power is just 500. Then, the total potential voting power is 1100. If both neurons vote, then A gets 100 / 1100 of the reward purse, while B gets only 500 / 1100 of the reward purse, not 1000 / 1100. You might also intuitively guess that the neurons get 100 / 600 and 500 / 600 of the reward purse, but this is (also) incorrect. The reason for this design is to keep the amount of rewards to refreshed neurons the same as before, not more. In other words, it should not be that some other neuron goes to sleep, and as a result, you get more rewards. It should only be that the sleeper neuron gets less. # References This is part of the "periodic confirmation" feature that was recently approved in proposal [132411][prop]. [prop]: https://dashboard.internetcomputer.org/proposal/132411 Closes https://dfinity.atlassian.net/browse/NNS1-3411. [👈 Previous PR][prev] | [Next PR (tangent) 👉][next] [prev]: #2375 [next]: #2470
DFINITYManu
pushed a commit
that referenced
this pull request
Nov 19, 2024
…voting power. (#2385) Whereas, before, we did not have a distinction between **potential** voting power vs. **deciding** voting power. When neurons refresh themselves, there is no difference between these. Whereas, when a neuron does not refresh itself recently enough, the amount of voting power in its ballots (its "deciding" voting power) is less than its potential voting power. # Example Suppose there are two neurons: * A has 100 potential voting power, and refreshed recently, and as a result, its deciding voting power is also 100. * B has 1000 potential voting power, but has not refreshed in a long time, and as a result, it's deciding voting power is just 500. Then, the total potential voting power is 1100. If both neurons vote, then A gets 100 / 1100 of the reward purse, while B gets only 500 / 1100 of the reward purse, not 1000 / 1100. You might also intuitively guess that the neurons get 100 / 600 and 500 / 600 of the reward purse, but this is (also) incorrect. The reason for this design is to keep the amount of rewards to refreshed neurons the same as before, not more. In other words, it should not be that some other neuron goes to sleep, and as a result, you get more rewards. It should only be that the sleeper neuron gets less. # References This is part of the "periodic confirmation" feature that was recently approved in proposal [132411][prop]. [prop]: https://dashboard.internetcomputer.org/proposal/132411 Closes https://dfinity.atlassian.net/browse/NNS1-3411. [👈 Previous PR][prev] | [Next PR (tangent) 👉][next] [prev]: #2375 [next]: #2470
daniel-wong-dfinity-org
force-pushed
the
range-neuron-sections-daniel-wong
branch
from
November 25, 2024 16:14
2f9023c to
ea8ec66
Compare
max-dfinity
approved these changes
Nov 25, 2024
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 26, 2024
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 26, 2024
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 26, 2024
…asy to mistakenly think that by default, all auxiliary data is being selected. Instead, people should use either NeuronStore::NONE (the equivalent replacement), or NeuronStore::ALL, because these options are explicit (and therefore, much less error-prone).
… to run again after `git rebase --continue`??
daniel-wong-dfinity-org
force-pushed
the
range-neuron-sections-daniel-wong
branch
from
November 26, 2024 16:10
ed3bcf7 to
2d428e1
Compare
daniel-wong-dfinity-org
enabled auto-merge
November 26, 2024 16:10
daniel-wong-dfinity-org
deleted the
range-neuron-sections-daniel-wong
branch
November 26, 2024 16:40
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Dec 2, 2024
Remove following when a neuron has not refreshed in more than 7 months. The one exception is ManageNeuron; following on that topic is retained forever. In a later change (soon), this will be called periodically in the background of the NNS governance canister. For now, this does not result in any externally visible behavior changes to any canisters. # References [👈 Previous PR][prev] | [Next PR 👉][next] [prev]: #2470 [next]: #2392
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead, callers should use either NeruonSections::ALL or NeuronSections::NONE. It is very easy for a caller to think NeuronSections::default() is equivalent to ALL, when actually, it's equivalent to NONE. Whereas, it is basically impossible to misunderstand what ALL and NONE do.
History of This Pull Request
Earlier, this PR tried to add support for sections to neuron range. But Max developed that independently/concurrently, and he was able to merge first. Therefore, the main change that I was originally trying to do has been removed from this PR. What remains is
NeuronSections::ALL, a constant that replacesNeuronsSections::all(anfn).NeuronSections::NONE.In terms of interface, the difference between what I did vs. what Max merged is that I figured that there should be one range_neurons method, which should additionally take NeuronSections; whereas, he created range_neurons_sections.
His interface also seems reasonable. I think my "1 range_neurons to rule them all" approach has various advantages, the main one being that it minimizes API surface area.
References
👈 Previous PR | Next PR 👉