Skip to content

feat(nns): Added prune_some_following. - #2471

Merged
daniel-wong-dfinity-org merged 12 commits into
masterfrom
prune_some_following-daniel-wong
Dec 2, 2024
Merged

daniel-wong-dfinity-org merged 12 commits into
masterfrom
prune_some_following-daniel-wong

Conversation

@daniel-wong-dfinity-org

@daniel-wong-dfinity-org daniel-wong-dfinity-org commented Nov 6, 2024 •

Copy link
Copy Markdown
Contributor

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 | Next PR 👉

Comment thread rs/nns/governance/src/neuron_store.rs Resolved
Comment thread rs/nns/governance/src/neuron_store.rs Resolved
Comment thread rs/nns/governance/src/neuron_store.rs Resolved
Comment thread rs/nns/governance/src/neuron_store.rs Resolved
@daniel-wong-dfinity-org
daniel-wong-dfinity-org force-pushed the range-neuron-sections-daniel-wong branch from 2f9023c to ea8ec66 Compare November 25, 2024 16:14
@daniel-wong-dfinity-org
daniel-wong-dfinity-org force-pushed the prune_some_following-daniel-wong branch from 96f7d9e to 3119c00 Compare November 26, 2024 11:39
@daniel-wong-dfinity-org
daniel-wong-dfinity-org force-pushed the range-neuron-sections-daniel-wong branch from ed3bcf7 to 2d428e1 Compare November 26, 2024 16:10
@daniel-wong-dfinity-org
daniel-wong-dfinity-org force-pushed the prune_some_following-daniel-wong branch from c0e4bea to c418d39 Compare November 26, 2024 16:15
github-merge-queue Bot pushed a commit that referenced this pull request Nov 26, 2024
…2470)

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

1. Additional tests
2. `NeuronSections::ALL`, a constant that replaces
`NeuronsSections::all` (an `fn`).
3. Added `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][prev] | [Next PR 👉][next]

[prev]: #2385
[next]: #2471
Base automatically changed from range-neuron-sections-daniel-wong to master November 26, 2024 16:40
Comment thread rs/nns/governance/src/neuron_store.rs Resolved
Comment thread rs/nns/governance/src/neuron_store.rs Resolved
Comment thread rs/nns/governance/src/neuron_store.rs Resolved
Comment thread rs/nns/governance/src/neuron_store.rs Resolved
@max-dfinity
max-dfinity self-requested a review November 27, 2024 15:55
@daniel-wong-dfinity-org
daniel-wong-dfinity-org force-pushed the prune_some_following-daniel-wong branch from 7ba6744 to e8bb0ec Compare December 2, 2024 18:04
@daniel-wong-dfinity-org
daniel-wong-dfinity-org added this pull request to the merge queue Dec 2, 2024
@daniel-wong-dfinity-org
daniel-wong-dfinity-org removed this pull request from the merge queue due to a manual request Dec 2, 2024
daniel-wong-dfinity-org

This comment was marked as duplicate.

@daniel-wong-dfinity-org
daniel-wong-dfinity-org added this pull request to the merge queue Dec 2, 2024
Merged via the queue into master with commit 7b475b3 Dec 2, 2024
@daniel-wong-dfinity-org
daniel-wong-dfinity-org deleted the prune_some_following-daniel-wong branch December 2, 2024 21:29
github-merge-queue Bot pushed a commit that referenced this pull request Dec 3, 2024
…s. (#2392)

This is something that happens in the background, and is low priority.

# Background

This is part of the "periodic confirmation" feature that was recently
approved in proposal [132411][prop].

[prop]: https://dashboard.internetcomputer.org/proposal/132411

# References

Closes https://dfinity.atlassian.net/browse/NNS1-3409.

[👈 Previous PR][prev]

[prev]: #2471
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants