# NNS Updates, Dec 13, 2024

**URL:** <https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854>\
**Category:** Developers\
**Tags:** nns, Protocol-canister-management\
**Created:** [December 13, 2024, 11:41pm UTC](https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854 "2024-12-13T23:41:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonzhu](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jasonzhu/32/12251_2.png) [@jasonzhu](https://forum.dfinity.org/u/jasonzhu)\
**Post date:** [December 13, 2024, 11:41pm UTC](https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854/1 "2024-12-13T23:41:32Z")

</div>

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

## Proposals to be Submitted

### 

[https://dashboard.internetcomputer.org/proposal/134500](https://dashboard.internetcomputer.org/proposal/134500)

````auto

# Upgrade the Cycles-minting Canister to Commit ee52ab3

__Proposer__ : jason.zhu at dfinity.org

__Source code__ : [ee52ab3056cf5f39b09b08de70bdd20485c8b2dc][new-commit]

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

## Summary

Increase the cycles limit by 3x and add metrics for the limiter.

## New Commits

```

$ git log --format="%C(auto) %h %s" ca8847547d327ce8a3bd81d25a590e01da1a3af5..ee52ab3056cf5f39b09b08de70bdd20485c8b2dc -- ./rs/nns/cmc

c89c23e5e5 feat(cmc): Increase cycles_limit by 3x. (#3093)

7b5227e9dd feat(cmc): Limiter metrics. (#3118)

```

## Upgrade Arguments

```candid

()

```

## Current Version

__Current git hash__ : ca8847547d327ce8a3bd81d25a590e01da1a3af5

__Current wasm hash__ : 57f2cbbdbc2d8943173acc6ebd55aca9b9c12e2140b38ff5f20aea7b101ea570

## 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/ee52ab3056cf5f39b09b08de70bdd20485c8b2dc/rs/nervous_system/docs/proposal_verification.md

### WASM Verification

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

[prereqs]: https://github.com/dfinity/ic/tree/ee52ab3056cf5f39b09b08de70bdd20485c8b2dc/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 ee52ab3056cf5f39b09b08de70bdd20485c8b2dc

# 2. Build canisters.

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

# 3. Fingerprint the result.

sha256sum ./artifacts/canisters/cycles-minting-canister.wasm.gz

```

This should match `wasm_module_hash` field of this proposal.

### Upgrade Arguments Verification

[`didc`][latest-didc] is required.

[latest-didc]: https://github.com/dfinity/candid/releases/latest

```

didc encode '()' | xxd -r -p | sha256sum

```

This should match the `arg_hash` field of this proposal.

````

### 

[https://dashboard.internetcomputer.org/proposal/134500](https://dashboard.internetcomputer.org/proposal/134500)

````auto

# Upgrade the Governance Canister to Commit ee52ab3

__Proposer__ : jason.zhu at dfinity.org

__Source code__ : [ee52ab3056cf5f39b09b08de70bdd20485c8b2dc][new-commit]

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

## Summary

* Prepare for neurons migration to stable memory by adding benchmarks and optimizing neuron related operations.

* Changes needed for periodic confirmation.

## New Commits

```

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

ee52ab3056 fix(nns): Fix benchmark by simulating proper behavior in canbench-rs build (#3160)

0e853680c2 perf(nns): Improve neuron validation batching (#3105)

e3cc69fe44 perf(nns): Avoid running `StableNeuronStoreValidator` after migration (#3104)

09fa8e6796 perf(nns): Read heap neurons for cardinalities (#3103)

1f952c5295 perf(nns): Add benchmarks for neuron data validator (#3102)

cf7d6c2b9b test(nns): Add a benchmark for list neurons (#3076)

c606036a64 feat(nns): Count stale and expired voting power neurons. (#3090)

ac17241242 feat(nns): Periodic confirmation metrics. (#3070)

f1bcb142fd chore(nns): Clarify the purpose of loading the known neuron section when calculating metrics (#3022)

e155963b3e perf(nns): Improve listing neurons fund neurons (#3020)

e4fc40580d perf(nns): Add benchmark for listing neurons fund neurons (#3019)

00eb69d99f test(nns): Add recent_ballots_next_entry_index to NeuronBuilder and let it be So… (#3073)

a2e186250a refactor(nns): pass begin: Bound<NeuronId> to schedule_prune_some_following. (#3061)

3cf3ebcdec docs(nns): Deleted comments that say Comand (and related) types are deprecated. (#3023)

f9636c623c feat(nns): Highly scalable voting (#2932)

```

## Upgrade Arguments

```candid

()

```

## Current Version

__Current git hash__ : 0f35ac817bdf3b44680111fc90ce5d6e3bc79be1

__Current wasm hash__ : 5ef169ca0f8765e9d2195988bc4ec26b1b8f0480b22fbd16c5ba148547b90c3d

## 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/ee52ab3056cf5f39b09b08de70bdd20485c8b2dc/rs/nervous_system/docs/proposal_verification.md

### WASM Verification

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

[prereqs]: https://github.com/dfinity/ic/tree/ee52ab3056cf5f39b09b08de70bdd20485c8b2dc/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 ee52ab3056cf5f39b09b08de70bdd20485c8b2dc

# 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.

### Upgrade Arguments Verification

[`didc`][latest-didc] is required.

[latest-didc]: https://github.com/dfinity/candid/releases/latest

```

didc encode '()' | xxd -r -p | sha256sum

```

This should match the `arg_hash` field of this proposal.

````

---

<div class="post-metadata">

**Author:** ![cyberowl](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cyberowl/32/3635_2.png) [@cyberowl](https://forum.dfinity.org/u/cyberowl)\
**Post date:** [December 15, 2024, 9:57pm UTC](https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854/2 "2024-12-15T21:57:01Z")

</div>

# proposal - [134499](https://dashboard.internetcomputer.org/proposal/134499)

 ![signal-2024-12-14-185158_002](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/e/9/e9ec298343da94dece7c8248c58dab00d6dfe594.png)

### Vote: ADOPT

### Reason:

I successfully built and verified the hash. All the commit descriptions match their code changes.

### Hash Match: MATCH

### Feedback: NONE

### Proposer Check: MATCH

### Commits

[ee52ab3056](https://github.com/dfinity/ic/commit/ee52ab3056)  
Conditional compilation to differentiate behavior between production, testing, and benchmarking (`canbench-rs`) environments.

Allows simulation of instruction limits by tracking and setting a fake instruction threshold. This ensures that during benchmarking, the system accurately mimics production-like instruction constraints.

[0e853680c2](https://github.com/dfinity/ic/commit/0e853680c2)  
Updates the validation logic to only load the necessary parts of each neuron from stable memory (`NeuronSections`), rather than loading entire neurons.

[e3cc69fe44](https://github.com/dfinity/ic/commit/e3cc69fe44)  
Removes the need for `StableNeuronStoreValidator` for `ValidationInProgress`. Only adds it when migration is NOT in progress.

[09fa8e6796](https://github.com/dfinity/ic/commit/09fa8e6796)  
For `cardinality_primary_heap` it now reads `heap_neurons` instead of `with_active_neurons`. This is a perf fix.

[1f952c5295](https://github.com/dfinity/ic/commit/1f952c5295)  
Adds bench `neuron_data_validation_heap` and `neuron_data_validation_stable`.

[cf7d6c2b9b](https://github.com/dfinity/ic/commit/cf7d6c2b9b)  
New benchmark test measures the performance of the `list_neurons` function by simulating the retrieval of 100 neurons under both stable and heap memory configurations.

[c606036a64](https://github.com/dfinity/ic/commit/c606036a64)  
Two new metrics fields in the governance data model: `declining_voting_power_neuron_subset_metrics` and `fully_lost_voting_power_neuron_subset_metrics`. These metrics track neurons whose voting power has begun to decay or is fully decayed due to not refreshing their voting power recently.

[ac17241242](https://github.com/dfinity/ic/commit/ac17241242)  
Two additional voting power metrics alongside the existing total voting power metric, specifically “deciding voting power” and “potential voting power,” and their corresponding bucketed breakdowns.

[f1bcb142fd](https://github.com/dfinity/ic/commit/f1bcb142fd)  
Matches description `clarify the purpose of loading the known neuron section when calculating metrics`

[e155963b3e](https://github.com/dfinity/ic/commit/e155963b3e)  
Eliminates the generic `filter_map_active_neurons` function and directly utilizes `with_active_neurons_iter_sections` with specified neuron sections to filter and map active Neurons’ Fund neurons.

[e4fc40580d](https://github.com/dfinity/ic/commit/e4fc40580d)  
Two new benchmark scenarios (`list_active_neurons_fund_neurons_heap` and `list_active_neurons_fund_neurons_stable`), along with small adjustments to the instruction counts in existing benchmarks. Refactor neuron creation in the benchmarking code to use a `new_neuron_builder` function and conditionally compile certain test fields (like `recent_ballots`) for better flexibility.

[00eb69d99f](https://github.com/dfinity/ic/commit/00eb69d99f)  
Matches description of `add recent_ballots_next_entry_index to NeuronBuilder`.

[a2e186250a](https://github.com/dfinity/ic/commit/a2e186250a)  
Eliminates the use of the thread-local `PRUNE_FOLLOWING_CHECKPOINT` by modifying `schedule_prune_following` to accept the checkpoint (`original_begin`) as a function parameter instead.

[3cf3ebcdec](https://github.com/dfinity/ic/commit/3cf3ebcdec)  
Removal of comments.

[f9636c623c](https://github.com/dfinity/ic/commit/f9636c623c)  
New pkg (`ic-nervous-system-long-message`), add it as a dependency in Cargo, and adjust the existing logic for splitting long-running tasks (like cascading neuron votes) into multiple message calls using self-calls to a no-op method. Implement a `ProposalVotingStateMachine` and `VotingStateMachines` that track ongoing vote processing across multiple messages. The changes also include updates to how proposals and recent ballots are recorded, ensuring that voting operations can exceed the instruction limits by spanning multiple rounds through self-calls and scheduled timer tasks.

# proposal - [134500](https://dashboard.internetcomputer.org/proposal/134500)

 ![Screenshot from 2024-12-14 18-43-06](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/6/c/6cfbbee78f2c3556bde9b6b9583d6a8727abfe83.png)

### Vote: ADOPT

### Reason:

I successfully built and verified the hash. All the commit descriptions match their code changes.

### Hash Match: MATCH

### Feedback: NONE

### Proposer Check: MATCH

### Commits

[c89c23e5e5](https://github.com/dfinity/ic/commit/c89c23e5e5)  
Increase default cycles limit to `150e15`.

[7b5227e9dd](https://github.com/dfinity/ic/commit/7b5227e9dd)  
Added metrics track the number of rejected minting requests due to limiter constraints (`cmc_limiter_reject_count`), the amount of recently minted cycles (`cmc_limiter_cycles`), and the maximum allowable cycles that can be minted in the recent past (`cmc_cycles_limit`).

---

<div class="post-metadata">

**Author:** ![ZackDS](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/zackds/32/40368_2.png) [@ZackDS](https://forum.dfinity.org/u/ZackDS)\
**Post date:** [December 16, 2024, 9:07am UTC](https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854/3 "2024-12-16T09:07:04Z")

</div>

## Proposal #[134499](https://dashboard.internetcomputer.org/proposal/134499) Governance canister

**Vote** : Adopted  
**Reason** : Builds fine and both hashes for the WASM and arguments matches, as do all the listed commits.

 ![Screenshot 2024-12-15 082009](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/8/2/822a5f13e09df296a2141054d7b88cd50cc0a69c.png)

---

<div class="post-metadata">

**Author:** ![ZackDS](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/zackds/32/40368_2.png) [@ZackDS](https://forum.dfinity.org/u/ZackDS)\
**Post date:** [December 16, 2024, 9:08am UTC](https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854/4 "2024-12-16T09:08:14Z")

</div>

## Proposal #[134500](https://dashboard.internetcomputer.org/proposal/134500) CMC (Cycles-minting Canister)

**Vote** : Adopted  
**Reason** : Builds fine and both hashes for the WASM and arguments matches, as do the two commits.

 ![Screenshot 2024-12-15 083002](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/b/e/befda53826d6a79e28835299f1d3abb57b427697.png)

[c89c23e5e5](https://github.com/dfinity/ic/commit/c89c23e5e5) feat(cmc): Increase cycles\_limit by 3x.  
Done by setting `DEFAULT_CYCLES_LIMIT` to `150e15` from previous `50e15`, this is a 3 times increase that equals to `150,000,000,000,000,000` .  
Motivation beeing that with prices currently up some users reportedly hit the previous limit.  
[7b5227e9dd](https://github.com/dfinity/ic/commit/7b5227e9dd) feat(cmc): Limiter metrics.  
Adds `LIMITER_REJECT_COUNT` counter for tracking the number of rejected operations to the check when a new operation `cycles_to_mint` will exceed the predefined cycle limit `state.cycles_limit`. If it will, it rejects the operation and increments the added rejection counter.  
Three new limiter metric will be used `cmc_limiter_reject_count`, `cmc_limiter_cycles` and `cmc_cycles_limit` for alerts with very detailed descriptions.

---

<div class="post-metadata">

**Author:** ![LaCosta](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lacosta/32/20232_2.png) [@LaCosta](https://forum.dfinity.org/u/LaCosta)\
**Post date:** [December 16, 2024, 8:50pm UTC](https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854/5 "2024-12-16T20:50:17Z")

</div>

# [Proposal 134499](https://dashboard.internetcomputer.org/proposal/134499)

**Vote: ADOPT**

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/7/e/7e0e9f08f177cc1fab51f62b9c29339eeee3d7b9.png)

# [Proposal 134500](https://dashboard.internetcomputer.org/proposal/134500)

**Vote: ADOPT**

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/8/4/846c81d384df7d66b74480d156b8eb6b6e185401.png)

---

<div class="post-metadata">

**Author:** ![Zane](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/zane/32/6541_2.png) [@Zane](https://forum.dfinity.org/u/Zane)\
**Post date:** [December 19, 2024, 8:15pm UTC](https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854/6 "2024-12-19T20:15:35Z")

</div>

# Proposal 134499

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

![134499](https://us1.discourse-cdn.com/flex023/uploads/dfn/optimized/3X/7/f/7f74b28df7115f3c7aa7dce6f32928b1b92df633_2_690x35.png)

[f9636c623c](https://github.com/dfinity/ic/commit/f9636c623c) Implemented Storable trait for ProposalId. Refactor `noop_self_call_if_over_instructions` method to make noop call even if call context threshold is reached and return a `OverCallContextError` instead of panicking. Reserved an additional memory id and added protobuf definitions for voting state machines so they can be persisted in stable memory.

Reworked logic in `cast_vote_and_cascade_follow` so that processing for the proposal state machine can span across multiple messages, this is achieved by calling a wrapper method of `noop_self_call_if_over_instructions`, that implements different behavior depending whether it is running under a benchmark or not, for the latter case it makes an async noop call everytime `SOFT_VOTING_INSTRUCTIONS_LIMIT` is hit and exits the loop if `HARD_VOTING_INSTRUCTIONS_LIMIT` is reached as a failsafe, otherwise it does nothing. The soft limit also vary based on the tags used when compiling the canister, with it being lower and overridable when test tag is used.

When `cast_vote_and_cascade_follow` is called the neuron’s vote is immediately registered in the state machine, then as long as `HARD_VOTING_INSTRUCTIONS_LIMIT` is not reached, the vote is propagated to all eligible followers and finally recent ballots for all affected neurons are updated. A timer has also been added to run every 3 seconds and complete processing of any state machines that didn’t manage to complete in time.

[ee52ab3056](https://github.com/dfinity/ic/commit/ee52ab3056) Implemented fake instruction counter to be used in benchmarks.

[0e853680c2](https://github.com/dfinity/ic/commit/0e853680c2) Optimized neuron validation by only reading necessary neuron sections and limiting iterations by instructions used instead of a fixed batch size.

[e3cc69fe44](https://github.com/dfinity/ic/commit/e3cc69fe44) Only run `StableNeuronStoreValidator` if `is_active_neurons_in_stable_memory_enabled` is false.

[09fa8e6796](https://github.com/dfinity/ic/commit/09fa8e6796) Optimized cardinalities validation by iterating directly on heap neurons instead of relying on `with_active_neurons_iter` method.

[1f952c5295](https://github.com/dfinity/ic/commit/1f952c5295) Same as description.

[cf7d6c2b9b](https://github.com/dfinity/ic/commit/cf7d6c2b9b) Added benchmark for list neurons and minor optimization in `get_non_empty_neuron_ids_readable_by_caller` by not reading any neuron section when determining if a neuron has any stake.

[c606036a64](https://github.com/dfinity/ic/commit/c606036a64) Added two new metrics to keep track of neurons with declining or zero voting power.

[ac17241242](https://github.com/dfinity/ic/commit/ac17241242) Added metrics to track total and per neuron potential and deciding voting power and timestamp of each pruning process cycle reset.

[f1bcb142fd](https://github.com/dfinity/ic/commit/f1bcb142fd) Same as description.

[e155963b3e](https://github.com/dfinity/ic/commit/e155963b3e) Optimized `list_active_neurons_fund_neurons` by only reading `hot_keys` section.

[e4fc40580d](https://github.com/dfinity/ic/commit/e4fc40580d) Same as description.

[00eb69d99f](https://github.com/dfinity/ic/commit/00eb69d99f) Same as description.

[a2e186250a](https://github.com/dfinity/ic/commit/a2e186250a) Instead of storing the checkpoint neuron id to be used during the pruning process in global state, the initial value is provided directly to `schedule_prune_following` and then passed on recursively.

[3cf3ebcdec](https://github.com/dfinity/ic/commit/3cf3ebcdec) Same as description.

---

<div class="post-metadata">

**Author:** ![Zane](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/zane/32/6541_2.png) [@Zane](https://forum.dfinity.org/u/Zane)\
**Post date:** [December 19, 2024, 8:16pm UTC](https://forum.dfinity.org/t/nns-updates-dec-13-2024/38854/7 "2024-12-19T20:16:58Z")

</div>

# Proposal 134500

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

 ![134500](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/3X/1/c/1cbb6448264c4e29fbc7cd801f1d13f8983a672c.png)

[c89c23e5e5](https://github.com/dfinity/ic/commit/c89c23e5e5) Increased limit of cycles that can be minted in a certain timeframe by 3x.

[7b5227e9dd](https://github.com/dfinity/ic/commit/7b5227e9dd) Added metrics to track how many times rate limiting has been triggered for cycles minting, how many cycles have been minted in the past hour and the cycle limit used.
