NNS Updates: 2025-05-09

The Governance team submitted the following proposals. DFINITY plans to vote on these proposals the following Tuesday (since they were submitted slightly later than usual).

Submitted Proposals

Governance

https://dashboard.internetcomputer.org/proposal/136580

# Upgrade the Governance Canister to Commit 5639c29

__Proposer__: arshavir.ter.gabrielyan at dfinity.org

__Source code__: [5639c29fd72de16d483be7fe6dedc86e9bec3b9e][new-commit]

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


## Features & Fixes

###  Removed

* The `governance_heap_neuron_count` metric is removed as there are no neurons in the heap anymore.


## New Commits

```
$ git log --format="%C(auto) %h %s" 9dfa7825fc087deacccbed3985a502e0ec2276ff..5639c29fd72de16d483be7fe6dedc86e9bec3b9e --  ./rs/nns/governance ./rs/sns/init
 5ab508970d refactor(nns): Clean up NeuronStore::heap_neurons (#5007)
 b539aa4d01 refactor(nns): Rename the governance API crate from pb::v1 to types (#4986)
 3490ef2a07 chore: bump the monorepo version of ic-cdk to 0.18.0 (#5005)
 f2f7d8d434 chore(nns): Stop registering ballots in with_neuron_mut (#5006)
 41d97b59eb refactor(nns): Stop validating heap neurons (#4969)
 b2147e4588 refactor(nns): Stop calculating metrics from heap_neurons (#4987)
 7b3e386ff2 feat(nns): Stop recording new snapshots when there is a spike (#4881)
 17bec1046a feat(nns): Consider neurons with maturity disbursements as non empty (#4967)
 632e8943fb docs(governance): Update CHANGELOG files for 2025-05-02 Governance team release. (#4965)
```


## Current Version

__Current git hash__: 9dfa7825fc087deacccbed3985a502e0ec2276ff

__Current wasm hash__: 713333b2b4a1847c225aee3927d515f97524ffddade773e6e3027189b127b46d


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


### WASM Verification

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

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

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

Registry

https://dashboard.internetcomputer.org/proposal/136581

# Upgrade the Registry Canister to Commit 5639c29

__Proposer__: arshavir.ter.gabrielyan at dfinity.org

__Source code__: [5639c29fd72de16d483be7fe6dedc86e9bec3b9e][new-commit]

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


## Features & Fixes

###  Added

* Added new endpoint for `migrate_canisters` which is only callable by governance, and updates the routing table for
  the provided canisters when called so that requests will be routed to a different subnet. This will be used to support
  the broader canister migrations feature.

* Started populating `timestamp_seconds` fields.

###  Changed

* The `create_subnet` and `recover_subnet` calls are using the `reshare_chain_key` endpoint rather than the old `compute_initial_i_dkg_dealings` endpoint. With this change, recovery of vetkeys is supported.


## New Commits

```
$ git log --format="%C(auto) %h %s" 9dfa7825fc087deacccbed3985a502e0ec2276ff..5639c29fd72de16d483be7fe6dedc86e9bec3b9e --  ./rs/registry/canister
 57f4342e9f feat: populating `timestamp_seconds` in the registry canister (#5023)
 12ade05922 feat: CRP-2618 Allow zero `pre_signatures_to_create_in_advance` in vetKD `ChainKeyConfig` (#5014)
 3490ef2a07 chore: bump the monorepo version of ic-cdk to 0.18.0 (#5005)
 0c4a85be7e feat(CRP-2711): Migrate registry to reshare chain key endpoint (#4245)
 9e35adbf2a feat(registry): migrate_canisters endpoint updates routing table (#4988)
 2c6673bdc9 feat(registry): Migrate `Registry::store` to high-capacity types. (#4913)
 879713426a feat(registry): Add canister migrations endpoint with no functionality (#4954)
 632e8943fb docs(governance): Update CHANGELOG files for 2025-05-02 Governance team release. (#4965)
```


## Current Version

__Current git hash__: 9dfa7825fc087deacccbed3985a502e0ec2276ff

__Current wasm hash__: 1d36373e3294b4cf38fa5b1361e476baf49aefbbf636eae137d6d5b0572d3b50


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


### WASM Verification

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

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

# 2. Build canisters.
./ci/container/build-ic.sh -c

# 3. Fingerprint the result.
sha256sum ./artifacts/canisters/registry-canister.wasm.gz
```

This should match `wasm_module_hash` field of this proposal.

proposals - [136580, 136581] Cyberowl | CodeGov

Proposals:

136580
136581

Vote: ADOPT

Reason & Feedback:

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

Checks:

Hash Match: [MATCH, MATCH]
Target Canister: [MATCH, MATCH]
Proposer Check: [MATCH, MATCH]

Overall Summary:

Proposals 136580 and 136581 introduce changes to Governance and Registry canister, including consolidating neuron storage to stable memory, adding support for high-capacity chunked values, and enabling canister migration across subnets with new endpoints and validation.

Commits Summary

proposal/136580

5ab508970d
Eliminates heap-based code paths, simplifying NeuronStore by removing heap_neurons. All read/write helpers now go straight into StableNeuronStore.

b539aa4d01
Removes the versioned pb::v1 intermediate module and flattens everything to ic_nns_governance_api::{…}

3490ef2a07
Bump of the IC-CDK crates from 0.17 → 0.18 while still preserving the older 0.17.1 API for code.

f2f7d8d434
Fixes benchmark for neuron.register_recent_ballot(Topic::Governance, &ProposalId { id: 1 }, Vote::Yes);

41d97b59eb
Kills off the legacy “heap” validation paths and makes every validation task operate against a single, stable store with one unified next_neuron_id.

b2147e4588
Kills off the old “also look at heap‐resident neurons” path in both validation and metrics, consolidating everything to use only the stable‐memory store.

7b3e386ff2
Adds “voting-power spike” detection with new helper, refactors the snapshot code to use it, and changes the recurring snapshot task so that once a spike is detected it stops taking further snapshots until the window expires.

17bec1046a
Neurons with in-progress maturity disbursements as “non-empty” by adding a has_maturity_disbursement_in_progress method in types.rs and updating the is_non_empty predicate in neuron_store.rs to include such neurons.

632e8943fb
Update change logs.

proposal/136581

57f4342e9f
timestamp_seconds field in registry entries by capturing real timestamps in integration tests, populating mutations.timestamp_seconds in the canister’s changelog_insert flow using a new get_current_timestamp_seconds()

12ade05922
Disables unnecessary pre-signature warm-up in tests, setting pre_signatures_to_create_in_advance to 0 for keys not requiring pre-signatures, and introducing a requires_pre_signatures helper on MasterPublicKeyId to centralize logic for ECDSA, Schnorr, and VetKd keys.

3490ef2a07
Same as proposal/136580

0c4a85be7e
Replaces the old compute_initial_i_dkg_dealings API with reshare_chain_key, which supports both IDKG dealings and NiDKG transcripts via a new ReshareChainKeyResponse enum.

9e35adbf2a
Adds do_migrate_canisters + payload/response types in the registry canister. Changes to enable relocation of canister ids across subnets.

2c6673bdc9
High-capacity (chunked) value support to the Registry canister under a test feature, creating a reusable ic-nervous-system-chunks crate for blob chunking, replacing the internal store with HighCapacityRegistryValue.

879713426a
Groundwork for the migrate_canisters endpoint in the Registry canister, introducing a dedicated do_migrate_canisters.rs module, integrating the new method into registry.did and the changelog, and implementing a temporary authorization check against GOVERNANCE_CANISTER_ID.

632e8943fb
Same as proposal/136580

About CodeGov

CodeGov has a team of developers who review and vote independently on the following proposal topics: IC-OS Version Election, Protocol Canister Management, Subnet Management, Node Admin, and Participant Management. The CodeGov NNS known neuron is configured to follow our reviewers on these technical topics. We also have a group of Followees who vote independently on the Governance and the SNS & Neuron’s Fund topics. We strive to be a credible and reliable Followee option that votes on every proposal and every proposal topic in the NNS. We also support decentralization of SNS projects such as WaterNeuron, KongSwap, and Alice with a known neuron and credible Followees.

Learn more about CodeGov and its mission at codegov.org.

Adopt proposal 136580

Proposal

  • Canister id is correct.
  • The upgrade args correspond to the empty args.
  • The install mode is indeed upgrade.
  • The wasm hash is reproducible.

image

Code Review

[5ab508970d]: Remove NeuronStore::heap_neurons as neurons are now stored in stable memory. Remove governance_heap_neuron_count metric. Some tests involving the register_recent_ballot for heap neurons are deleted.
[b539aa4d01]: The ic_nns_governance_api crate no longer uses protobuf.
[3490ef2a07]: bump ic-cdk to 0.18 for the monorepo. ic-cdk stays at 0.17 for the governance canister, @daniel-wong are there plan to bump it for the governance?
[f2f7d8d434]: Ballot registration is handled via NeuronStore::register_recent_neuron_ballot, not with_neuron_mut, making the benchmark unrealistic.
[41d97b59eb]: heap_neurons no longer exist (migrated to stable memory), stop reading them in validation.
[b2147e4588]: Remove metrics computed from neuron heap.
[7b3e386ff2]: Halts new voting power snapshots during detected spikes, preventing normalization of anomalous data. It refactors spike detection into a dedicated function and adds an early return in snapshot execution.
[17bec1046a]: Consider neurons with maturity disbursements as non empty.
[632e8943fb]: changelog.


Adopt proposal 136581

Proposal

  • Canister id is correct.
  • The upgrade args correspond to the empty args.
  • The install mode is indeed upgrade.
  • The wasm hash is reproducible.

image

Code Review

[57f4342e9f]: Populate the timestamp_seconds fields.
[12ade05922]: VetKd does not use pre-signatures, and the corresponding configuration parameter is now ignored. Updates a registry invariant to permit chain keys that do not require pre-signatures to be configured with zero pre-signatures to generate in advance.
[3490ef2a07]: bump ic-cdk to 0.18.0
[0c4a85be7e]: The existing calls to compute_initial_i_dkg_dealings are being replaced with calls to reshare_chain_key.
[9e35adbf2a]: The registry method do_migrate_canisters actually updates the routing table, it was previously ignored.
[2c6673bdc9]: Migrate Registry::store to handle bigger chuncks.
[879713426a]: Add do_migrate_canisters with no implementation.
[632e8943fb]: Update changelog.

Proposal 136427 – LaCosta | CodeGov

Vote: ADOPT

Governance Canister

image
Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

[5ab508970d]: Since neurons have been migrated to stable memory, the commit does some cleanup in the NeuronStore by removing the field heap_neurons and refactoring functions that accessed it.

[b539aa4d01]: Refactors the ic_nns_governance_api crate renaming pb::v1 to types and moving impl blocks from pb.rs to lib.rs

[3490ef2a07]: Bumps the version of ic-cdk from 0.17.0 to 0.18.0 but still maintaining the previous crate version ic-cdk-0-17-1

[f2f7d8d434]: Removes neuron.register_recent_ballot call from function modify_neuron_all_sections used in the with_neuron_mut benchmark. This is because ballot registration is handled by NeuronStore::register_recent_neuron_ballot so using it would not be a real typical reflection of with_neuron_mut operations.

[41d97b59eb]: Inline with commit [b2147e4588], this commit continues removing heap_neurons related logic by stop checking heap_neurons for cardinalities and stop validating them in validate_next_chunk.

[b2147e4588]: Since heap_neurons no longer exist after the migration to stable_neurons this commit removes the calculation of metrics from heap_neurons.
Removes compute_neuron_metrics_current and compute_neuron_metrics_all_stable becomes compute_neuron_metrics.

[7b3e386ff2]: Adds a new method is_latest_snapshot_a_spike to check whether the latest snapshot is a voting power spike, returning false if there are no snapshots and calling new function totals_entry_with_minimum_total_potential_voting_power_if_voting_power_spiked otherwise. This function filters the snapshot with the minimum total voting power within a time window defined in MAXIMUM_STALENESS_SECONDS. A spike occurred if current_total_potential_voting_power is greater than minimum total voting power * MULTIPLIER_THRESHOLD_FOR_VOTING_POWER_SPIKE.
Updates the SnapshotVotingPowerTask execute method to check if the latest snapshot is a spike calling is_latest_snapshot_a_spike. If it is detected it returns early without recording the snapshot.

[17bec1046a]: Updates get_non_empty_neuron_ids_readable_by_caller to not consider a neuron “empty” if it has a maturity disbursement in progress.

[632e8943fb]: Updates change logs to include adopted proposals and corresponding changes.

Proposal 136428 – LaCosta | CodeGov

Vote: ADOPT

Registry Canister

image
Reason:
Build successful and hashes match, commits look great and match the description. Found no issues.

[57f4342e9f]: Adds new method get_current_timestamp_seconds to the Registry that returns the current time using ic_cdk::api::time() in wasm environments and std::time::SystemTime in non-wasm environments. The method is then used in apply_mutations to populate the timestamp_seconds field.

[12ade05922]: New function requires_pre_signatures returns whether the type of MasterPublicKeyId provided requires pre signatures or not. This is to allow cain keys such as the new vetKD to be configured with a value of 0.

[3490ef2a07]: Bumps the version of ic-cdk from 0.17.0 to 0.18.0 but still maintaining the previous crate version ic-cdk-0-17-1

[0c4a85be7e]: Replaces calls to get_all_initial_i_dkg_dealings_from_ic00 with get_all_chain_key_reshares_from_ic00. The migration to reshare_chain_key endpoint enables support for both IDKG dealings and NiDKG transcripts

[9e35adbf2a]: Updates the do_migrate_canisters method in the Registry to update the routing table. The methods starts by calling validate_payload that validates the canister_ids and the target_subnet_id. Then generates a mutation using new method migrate_canisters_to_subnet that iterates over each canister_id and calls assign_canister on the routing table. The mutation is finally applied with maybe_apply_mutation_internal.

[2c6673bdc9]: Adds support for high capacity types in the Registry canister. Registry::store field is updated to use BTreeMap<Vec<u8>, VecDeque<HighCapacityRegistryValue>> and methods get_high_capacity and get_changes_since are updated to use HighCapacityRegistryGetValueResponse to encode responses. In order to maintain backwards compatibility the get method calls get_high_capacity with posterior dechunkification logic and therefore clients will use get_high_capacity so the visibility of get was changed to pub(crate).

[879713426a]: Implements the base logic for the migrate_canisters endpoint creating a new module do_migrate_canisters currently empty. Adds a auth checker check_caller_is_canister_migration_orchestrator_and_log checking the caller against GOVERNANCE_CANISTER_ID

[632e8943fb]: Updates change logs to include adopted proposals and corresponding changes.

About CodeGov

CodeGov has a team of developers who review and vote independently on the following proposal topics: IC-OS Version Election, Protocol Canister Management, Subnet Management, Node Admin, and Participant Management. The CodeGov NNS known neuron is configured to follow our reviewers on these technical topics. We also have a group of Followees who vote independently on the Governance and the SNS & Neuron’s Fund topics. We strive to be a credible and reliable Followee option that votes on every proposal and every proposal topic in the NNS. We also support decentralization of SNS projects such as WaterNeuron, KongSwap, and Alice with a known neuron and credible Followees.

Learn more about CodeGov and its mission at codegov.org.

Proposal 136580 - Zane | CodeGov

Vote: ADOPT
Reason: Build completes successfully, both hashes and reviewed commits match their descriptions.
136580

5ab508970d Refactored neuron store to get rid of heap neurons since migration to stable memory has taken place and heap storage is no longer used for them. heap_neurons field has been removed from NeuronStore alongside logic used to toggle between stable/heap storage in CRUD methods, furthermore load_neuron_with_sections and load_neuron_all_sections have been modified to return an owned Neuron type instead of a clone on write smart pointer to a Neuron, similarly the callback passed to with_active_neurons_iter and with_active_neurons_iter_sections takes in an iterator which yields owned Neuron values instead of ones wrapped in a Cow, this was possible since reading from StableNeuronStore always returns a copied value. Deleted deprecated register_recent_ballot method from governance/src/neuron/types.rs. Removed governance_heap_neuron_count metric in encode_metrics method.

b539aa4d01 Renamed rs/nns/governance/api/src/ic_nns_governance.pb.v1.rs to types.rs and updated imports accordingly. Moved some impl blocks from rs/nns/governance/api/src/pb.rs to rs/nns/governance/api/src/lib.rs

3490ef2a07 Bumped the monorepo’s workspace version of ic-cdk to 0.18.0 and opt out of it for some packages by explicitly configuring them to use 0.17.1 instead.

f2f7d8d434 Removed call to register_recent_ballot method of Neuron struct from modify_neuron_all_sections bench helper function. The method was used to register ballots for heap neurons which have been deprecated and has been removed entirely by 5ab508970d anyways.

41d97b59eb Cleaned up heap neurons validation logic in neuron_data_validation.rs and delete heap_neurons_iter from NeuronStore.

b2147e4588 Deleted compute_neuron_metrics_current method as there is no longer a need for heap neurons metrics and merged compute_neuron_metrics_all_stable’s logic into compute_neuron_metrics.

7b3e386ff2 Refactored SnapshotVotingPowerTask logic to return early if a spike was detected in the last voting power snapshot. Before computing and storing a new snapshot, is_latest_snapshot_a_spike is called in SnapshotVotingPowerTask’s execute. This method retrieves the latest vp snapshot, if there is none then it returns false as no basis exists to detect a spike, otherwise totals_entry_with_minimum_total_potential_voting_power_if_voting_power_spiked is invoked and voting_power_totals’s last entry is passed to it. Here the provided total vp value is checked against the spike criteria, i.e current_total_potential_voting_power being greater than the smallest non stale value registered in voting_power_totals multiplied by MULTIPLIER_THRESHOLD_FOR_VOTING_POWER_SPIKE.

17bec1046a Modified get_non_empty_neuron_ids_readable_by_caller to also return neurons with pending maturity disbursements. Updated test_get_non_empty_neuron_ids_readable_by_caller to also validate the scenario where a neuron with in progress disbursement is present in the neuron store, in which case it has to be returned by get_non_empty_neuron_ids_readable_by_caller.

632e8943fb Updated changelogs files.

Proposal 136581 - Zane | CodeGov

Vote: ADOPT

Reason: Build completes successfully, both hashes and reviewed commits match their descriptions.
136581