NNS Updates: 20204-12-06

The NNS Team submitted the following proposals. DFINITY plans to vote on these proposals the following Monday.

  1. NNS Governance: https://dashboard.internetcomputer.org/proposal/134416

Proposals Submitted


# Upgrade the Governance Canister to Commit 0f35ac8

__Proposer__: andre at popovit.ch

__Source code__: [0f35ac817bdf3b44680111fc90ce5d6e3bc79be1][new-commit]

[new-commit]: https://github.com/dfinity/ic/tree/0f35ac817bdf3b44680111fc90ce5d6e3bc79be1

## New Commits

```

$ git log --format="%C(auto) %h %s" 25c1bb0227d9970f5673b908817d7c4962b29911..0f35ac817bdf3b44680111fc90ce5d6e3bc79be1 -- ./rs/nns/governance ./rs/sns/init

fd1545e5845 fix(nns): Copied RefreshVotingPower to ManageNeuronCommandRequest. (#3021)

1c78ac42048 feat(nns): Move unstake maturity into a timer (#2979)

46c02758634 chore(nns): Disable canbench test for NNS Governance (#2978)

9bf52c9f197 fix(nns): Change the default voting power refreshed timestamp from Nov 15 to Sep 1. (#2972)

105f1ee5c2d feat(nns): Propose voting power economics. (#2997)

52be01f4ba1 feat(nns): Add voting_power_economics to NetworkEconomics. (#2580)

1f88ae12ac7 feat(IC-1579): Spawn neuron(s) TLA instrumentation (#2944)

6e5283ddc7b refactor(nns): Move recompute_tally to inside of cast_vote_and_cascade_follow (#2977)

22dd92067ad feat(nns): Improve drawing/refunding neurons fund maturity when neurons in stable memory feature is enabled (#2975)

09f1152899a perf(nns): Add a benchmark for drawing neurons fund maturity (#2973)

bc673893c40 feat(nns): Move spawn_neurons to a one-minute timer (#2934)

3c714ea54ce feat(nns): Prune following when a neuron has not refreshed in 7 months. (#2392)

8f48d816196 refactor(nns): move cast_vote_and_cascade_following tests to voting.rs (#2930)

7b475b324ac feat(nns): Added prune_some_following. (#2471)

2c74170403d feat(nns): Improve listing neuron ids performance by reading the main section only (#2843)

```

## Current Version

__Current git hash__: 25c1bb0227d9970f5673b908817d7c4962b29911

__Current wasm hash__: ffa40d6d57647988cb4d84053a061872f53829f54faa1918464b199165052248

## Verification

See the general instructions on [how to verify] proposals like this. A "quick

start" guide is provided here.

[how to verify]: https://github.com/dfinity/ic/tree/0f35ac817bdf3b44680111fc90ce5d6e3bc79be1/rs/nervous_system/docs/proposal_verification.md

### WASM Verification

See ["Building the code"][prereqs] for prerequisites.

[prereqs]: https://github.com/dfinity/ic/tree/0f35ac817bdf3b44680111fc90ce5d6e3bc79be1/README.adoc#building-the-code

```

# 1. Get a copy of the code.

git clone git@github.com:dfinity/ic.git

cd ic

# Or, if you already have a copy of the ic repo,

git fetch

git checkout 0f35ac817bdf3b44680111fc90ce5d6e3bc79be1

# 2. Build canisters.

./ci/container/build-ic.sh -c

# 3. Fingerprint the result.

sha256sum ./artifacts/canisters/governance-canister.wasm.gz

```

This should match `wasm_module_hash` field of this proposal.

Usually governance canister upgrades are proposed under the “Protocol Canister Management” topic but this proposal is labeled as “Application Canister Management”, was it an oversight?

2 Likes

Bumping this for clarity @NNS Team.


1 Like

Proposal 134416

Vote: ADOPT

Reason: Build is successful and both code changes and hashes match.

134416

fd1545e5845 Added RefreshVotingPower variant to ManageNeuronCommandRequest to keep it in sync with manage_neuron::Command.

1c78ac42048 Moved unstake maturity from run_periodic_tasks, which is executed as a heartbeat every round, to a dedicated timer that runs every 60 seconds.

46c02758634 Same as description.

9bf52c9f197 Added a timer to update the voting_power_refreshed_timestamp_seconds field of all neurons which were set with Nov 15 as the default value. To avoid hitting the instruction limit, everytime a neuron is iterated upon a check happens to ensure no more than 50 mil instructions have been used in the call context, if that happens BACKFILL_VOTING_POWER_REFRESHED_TIMESTAMPS_CHECKPOINT has been added to the global state to keep track of the neuron id to start from and a new timer is scheduled to run 60 seconds. This process continues until all neurons have been checked.

52be01f4ba1 Added VotingPowerEconomics struct and extended NetworkEconomics with a new field named voting_power_economics of said type. The reason behind this change is to make it possible to configure voting power related parameters, such as time after which neuron following is cleared or voting power starts to decay, rather than having these values hardcoded. The struct’s default values are the same as the ones currently used and are initialized by calling set_initial_voting_power_economics when the canister is installed for the first time. A call to said method has also been temporarily added to the post_upgrade hook.
Many methods have been updated to take an immutable reference to the struct so they can use it for their calculations in place of hardcoded values.

105f1ee5c2d Modified perform_action method to allow ManageNetworkEconomics proposals to change VotingPowerEconomics. The method has also been cleaned up a bit, with the logic used to handle ManageNetworkEconomics moved to a separate method named: perform_manage_network_economics. The logic used is functionally the same, exception made for the addition of a console log in the remote case existing economics field is empty. The logic used to construct the new NetworkEconomics has also been made slightly more robust by using a new method inherit_from to check which fields are being updated. The new approach uses each field’s default method rather than an hardcoded value.
Updated test_network_economics_proposal test to ensure VotingPowerEconomics is properly being being changed. Left comment here

1f88ae12ac7 Added TLA instrumentation for spawn_neuron and spawn_neurons.

6e5283ddc7b Moved recompute_tally call from process_proposal to cast_vote_and_cascade_follow, this avoid wasteful recomputation of the tally since it is only processed when a vote is cast.

22dd92067ad Moved maturity update logic from apply_neurons_fund_snapshot to a dedicated method named modify_neuron_maturity. Provided different code paths based on neuron storage strategy and optimized scenario where use_stable_memory_for_all_neurons flag is true and the neuron that has to be updated has already been migrated to stable memory, in which case the neuron’s main section is updated directly instead of having to go through with_neuron_mut, which loads all neuron sections and is more expensive.

09f1152899a Same as description.

bc673893c40 Moved spawn_neurons from run_periodic_tasks, which is executed as a heartbeat every round, to a dedicated timer that runs every 60 seconds.

3c714ea54ce Added timer to periodically remove followees from neurons which haven’t been active for more than 7 months. The timer is scheduled to run every 60 seconds and as usual if the instructions executed in the call context exceed the imposed limit, a neuronId is saved in global state and when the timer is rescheduled the id is used as a checkpoint to continue the process.

8f48d816196 Same as description.

7b475b324ac Same as description.

2c74170403d Optimized neuron iteration in list_neurons_ready_to_unstake_maturity and list_ready_to_spawn_neuron_ids by replacing calls to filter_map_active_neuron with with_active_neurons_iter_sections with all sections disabled. The former uses with_active_neurons_iter under the hood which includes all neuron section, despite them not being needed in this scenario.