From 68e52f27bb067914fb58e92db2d3332d3a66e484 Mon Sep 17 00:00:00 2001 From: Daniel Wong <97631336+daniel-wong-dfinity-org@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:13:32 +0100 Subject: [PATCH] feat(governance): Enable periodic confirmation. (#3371) This is done by flipping a couple of flags. This is the last step in the release of "periodic confirmation". There is still some post-launch follow up work. All the usual consequences of this being a flag flip apply. In particular, if we need to roll back, it will be fairly easy and low risk. This causes a performance regression for metrics. [A ticket][regression] has been opened to follow up on that. For now, this has been deemed acceptable, because metrics are calculated in the background, and is performed infrequently. [regression]: https://dfinity.atlassian.net/browse/NNS1-3535 # 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 [NNS1-3444]. [NNS1-3444]: https://dfinity.atlassian.net/browse/NNS1-3444 --- .../governance/canbench/canbench_results.yml | 8 ++--- rs/nns/governance/src/lib.rs | 4 +-- rs/nns/governance/unreleased_changelog.md | 32 +++++++++++++++++++ 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/rs/nns/governance/canbench/canbench_results.yml b/rs/nns/governance/canbench/canbench_results.yml index 7d8efc965bc..98282e4d781 100644 --- a/rs/nns/governance/canbench/canbench_results.yml +++ b/rs/nns/governance/canbench/canbench_results.yml @@ -55,7 +55,7 @@ benches: scopes: {} compute_ballots_for_new_proposal_with_stable_neurons: total: - instructions: 2019526 + instructions: 2197226 heap_increase: 0 stable_memory_increase: 0 scopes: {} @@ -85,7 +85,7 @@ benches: scopes: {} list_neurons_heap: total: - instructions: 4345595 + instructions: 4700995 heap_increase: 9 stable_memory_increase: 0 scopes: {} @@ -133,13 +133,13 @@ benches: scopes: {} neuron_metrics_calculation_heap: total: - instructions: 954474 + instructions: 1457674 heap_increase: 0 stable_memory_increase: 0 scopes: {} neuron_metrics_calculation_stable: total: - instructions: 2479136 + instructions: 2982336 heap_increase: 0 stable_memory_increase: 0 scopes: {} diff --git a/rs/nns/governance/src/lib.rs b/rs/nns/governance/src/lib.rs index c85919f1875..13b1890016b 100644 --- a/rs/nns/governance/src/lib.rs +++ b/rs/nns/governance/src/lib.rs @@ -196,9 +196,9 @@ pub const DEFAULT_VOTING_POWER_REFRESHED_TIMESTAMP_SECONDS: u64 = 1725148800; // amount of time. thread_local! { - static IS_VOTING_POWER_ADJUSTMENT_ENABLED: Cell = const { Cell::new(cfg!(feature = "test")) }; + static IS_VOTING_POWER_ADJUSTMENT_ENABLED: Cell = const { Cell::new(true) }; - static IS_PRUNE_FOLLOWING_ENABLED: Cell = const { Cell::new(cfg!(feature = "test")) }; + static IS_PRUNE_FOLLOWING_ENABLED: Cell = const { Cell::new(true) }; // TODO(NNS1-3247): To release the feature, set this to true. Do not simply // delete. That way, if we need to recall the feature, we can do that via a diff --git a/rs/nns/governance/unreleased_changelog.md b/rs/nns/governance/unreleased_changelog.md index 992f06a9226..5751df51cb8 100644 --- a/rs/nns/governance/unreleased_changelog.md +++ b/rs/nns/governance/unreleased_changelog.md @@ -34,6 +34,38 @@ links to keepachangelog.com as its source of inspiration. ## Added +### Periodic Confirmation + +Enabled voting power adjustment and follow pruning. + +#### Prior Work + +This section describes related changes in previous releases. + +We already started recording how long it's been since neurons have confirmed +their following (aka refreshed voting power). Neurons were also given the +ability to confirm their following. Those who have never confirmed are +considered as having refreshed on Sep 1, 2024. + +This feature was proposed and approved in motion [proposal 132411]. + +[proposal 132411]: https://dashboard.internetcomputer.org/proposal/132411 + +#### New Behavior(s) (In This Release) + +With this enablement, not refreshing for more than 6 months will start to affect +the neuron. More precisely, + +1. If a neuron has not refreshed in 6 months, then votes have less influence on + the outcome of proposals. + +2. If a neuron has not refreshed in 7 months, + + a. It stops following other neurons (except on the NeuronManagement topic; + those followees are retained). + + b. Its influence on proposals goes to 0. + ## Changed ## Deprecated