SNS Update May 22

The NNS Team will be submitting the following proposals to publish new versions of SNS canisters to the SNS-WASM canister this Friday, 2023-05-26. DFINITY plans to vote on these proposals the following Monday.

Breaking Change

Note that these changes will only take effect when an SNS decide to upgrade, not immediately after the new SNS version is published to the SNS-WASM canister.

Who it affects:

  1. Users of CanisterStatusResultV2, which represents a canister summary
  2. SNS Root’s get_sns_canisters_summary, which returns the statuses and the canister IDs of all the canisters in an SNS
  3. SNS Governance’s get_root_canister_status, which returns the root canister status

The change:

  1. Several fields were removed from CanisterStatusResultV2 (candid, old struct, new struct) and DefiniteCanisterSettingsArgs (candid, old struct, new struct, you might have to click to expand the diff).
    1. CanisterStatusResultV2::freezing_threshold and CanisterStatusResultV2::balance are removed as they are duplicated inside CanisterStatusResultV2::settings.
    2. CanisterStatusResultV2::controller and CanisterStatusResultV2::settings::controller are removed as they have invalid semantics (canisters can have multiple or zero controllers). Instead of these fields, the field CanisterStatusResultV2::settings::controllers should be used to get a canister’s controllers
  2. SNS governance’s get_root_canister_status is being removed, because its is subsumed by get_sns_canisters_summary (which also returns the root canister status)

How to prevent breakage:

  1. Instead of using CanisterStatusResultV2::freezing_threshold or CanisterStatusResultV2::balance, use the fields of the same name inside CanisterStatusResultV2::settings instead. These are CanisterStatusResultV2::settings::freezing_threshold and CanisterStatusResultV2::settings::balance.
  2. Do not use CanisterStatusResultV2::controller or CanisterStatusResultV2::settings::controller. Instead, to get the canister’s controllers, use CanisterStatusResultV2::settings::controllers
  3. Use SNS Root’s get_sns_canisters_summary instead of SNS’s Governance’s get_root_canister_status.

Target date for submitting the proposal to publish these changes to SNS-WASM: May 26th, 2023.

Proposals to be Submitted

Governance

## Proposal to Publish the SNS Governance Canister WASM to SNS-W
### Proposer: DFINITY Foundation
### Canister Type: governance
### Git Hash: a3bddda7e2aa117a021c7e21f1e50d3650abe97f
### New Wasm Hash: 1ccfb23622c62d4ab936c971bd744f791ad08073d4691fdf3da7e25eda83f4d6
---
## Features

1. Profiling has been added to manage_neuron, giving greater visibility into which code paths are most responsible for cycles consumption. This will help developers identify and improve performance issues. The profiling information will be available in /metrics
2. Proposal payloads are now displayed in a more readable format
3. `get_proposal` now omits the proposal payload if it’s too large, which will fix the issue where large payloads would prevent the `get_proposal` response from fitting under the message size limit.
4. Added maturity modulation to the SNS

## Release Notes
```
$ git log --format="%C(auto) %h %s" 932c1bfc04728783a815e0867b579c1eb26df99d..a3bddda7e2aa117a021c7e21f1e50d3650abe97f --  ./rs/sns/governance
 8e7610cc7c feat: NNS1-2252: Decimate over-sized fields from get_proposal response in SNS governance.
 81ebc50f0e refactor: Vote cascading in NNS.
 8614235156 Restore governance's get_root_canister_status for now
 5a1e4b551e fix: Typo "the fetched value does not get *used*"
 2c33ae629a feat: NNS1-1829, NNS1-2021: Add maturity modulation to SNS.
 39c2dee156 NNS1-2170: No longer transmit deprecated fields of CanisterStatusResultV2
 55d82f0686 Refactor nervous_system_root in preparation for more structs
 a7ce41a95f NNS1-2178: Add endpoint to manually fail stalled UpgradeSnsToNextVersion proposals in SNS Governance
 850a1700fd Add profiling to calls made by manage_neuron
 ea01c3da11 NNS1-2175: Pretty-print proposal contents to make them more readable
 c57dd33937 Expose get_latest_reward_event in candid
 d771af7c2a NNS1-2155: add `rounds_since_last_distribution` field to RewardEvent
 6d7bdd8aeb fix(NNS1-2145): Neuron baskets should follow on the unspecified topic (attempt 2)
 293fc246f7 Prevent updating SNS neuron permissions via update_neuron
 5040382bd5 Merge branch 'sns-voting-rewards-extreme-parameters-daniel-wong' into 'master'
 b16734231f docs: Added a tiny comment about how a piece of code is just being defensive, and the condition is not expected to occur in practice.
 cdb86c56ad FI-658 Restructure icrc ledger types repository
 2c5d34bafe feat: NNS1-1582: Added validation and tests for SNS voting rewards.
 023a3605bc Merge branch 'restructure-gen-dir' into 'master'
 3b3a84d5cf IDX-2737 - Change `gen` directory location into `src/` for `rust-analyzer`
 3586c244f2 Fix typos in NNS and SNS comments
 bcd3bbbb10 GIX-1169: Rename unspecified nervous function
 71216c5356 NNS1-2160: Add profiling for governance canister heartbeat
 d41590783f [NNS1-2148] SNS voting should ignore empty followees
 7898b44d03 make it possible to reinstall sns controlled canisters
 949407ea4a feat: move icrc1 agent to a standalone icrc-ledger-agent library
 4d28dbbe87 NNS1-2122: Remove more panics from code
 45183ca9dd feat: switch icrc1 ledger to the types from the icrc-ledger-types library.
 976c20cf9e NNS1-2122: Handle some more panics and errors
 8c5018d996 NNS1-2122: Handle some panics
 b6c3955cfa [NNS1-2125] Should_distribute_rewards now checks all distrbiute_rewards preconditions
 1163dbe9cc Merge branch '@anchpop/NNS1-2128' into 'master'
 fa6a1714d3 NNS1-2128: Ensure NeuronPermissionList's `Display` impl works and won't panic
 f50e1d802c Write a test that demonstrates a neuron can follow itself and will override the "catch-all" following behavior
 9587cc9e11 NNS1-959: NNS proposal votes should not be able to be registered after the proposal deadline
 2f95ea4d37 NNS1-1591: Prevent voting on SNS proposals after the deadline has passed
 9d304729ac hide update_neuron in SNS-governance behind test flag
 fa7d5081af add method update_neuron to SNS governance canister for testing
```
## Wasm Verification
Verify that the hash of the gzipped WASM matches the proposed hash.
```
git fetch
git checkout a3bddda7e2aa117a021c7e21f1e50d3650abe97f
./gitlab-ci/container/build-ic.sh -c
sha256sum ./artifacts/canisters/sns-governance-canister.wasm.gz
```

Root

## Proposal to Publish the SNS Root Canister WASM to SNS-W
### Proposer: DFINITY Foundation
### Canister Type: root
### Git Hash: a3bddda7e2aa117a021c7e21f1e50d3650abe97f
### New Wasm Hash: 7b9896fa4a590a5e2f979bd36cb699a27e5eebf1f597e7f89ce0318a44da597e
---
## Features

1. A new "controllers" field has been added to the `CanisterStatusResultV2`. This should be used instead of the old “controller” field.
2. Deprecated fields of CanisterStatusResultV2 are no longer transmitted
3. The process of retrieving summaries for SNS canisters in `get_sns_canisters_summary` now makes calls in parallel. This should result in quicker responses and better performance when fetching information about canisters.
4. Provide an NNS Root API to allow SNS-W to change controllers of a canister that SNS Root controls.

## Release Notes
```
$ git log --format="%C(auto) %h %s" 932c1bfc04728783a815e0867b579c1eb26df99d..a3bddda7e2aa117a021c7e21f1e50d3650abe97f --  ./rs/sns/root
 39c2dee156 NNS1-2170: No longer transmit deprecated fields of CanisterStatusResultV2
 26ecbcbe5d NNS1-1926: Provide an NNS Root API to allow SNS-W to change controllers of a canister that root controls.
 55d82f0686 Refactor nervous_system_root in preparation for more structs
 787ad8b88d NNS1-1925 - Add the `controllers` field to the CanisterStatusResult served by NNS Root `canister_status` API
 d64ada9b05 NNS1-2115: Parallelize calls to owned canisters in get_sns_canisters_summary
 cdb86c56ad FI-658 Restructure icrc ledger types repository
 3b3a84d5cf IDX-2737 - Change `gen` directory location into `src/` for `rust-analyzer`
 45183ca9dd feat: switch icrc1 ledger to the types from the icrc-ledger-types library.
```
## Wasm Verification
Verify that the hash of the gzipped WASM matches the proposed hash.
```
git fetch
git checkout a3bddda7e2aa117a021c7e21f1e50d3650abe97f
./gitlab-ci/container/build-ic.sh -c
sha256sum ./artifacts/canisters/sns-root-canister.wasm.gz
```
3 Likes

Update: The NNS team will also be submitting a proposal to upgrade the SNS Swap canister, and will submit slightly newer versions of the other two canisters. Here is the updated information:

The NNS Team will be submitting the following proposals to publish new versions of SNS canisters to SNS-WASM this Friday, 2023-05-26. DFINITY plans to vote on these proposals the following Monday.

Breaking Change

Note that these changes will only take effect when an SNS decide to upgrade, not immediately after the new SNS version is published to the SNS-WASM canister.

Who it affects:

  1. Users of CanisterStatusResultV2, which represents a canister summary
  2. SNS Root’s get_sns_canisters_summary, which returns the statuses and the canister IDs of all the canisters in an SNS
  3. SNS Governance’s get_root_canister_status, which returns the root canister status

The change:

  1. Several fields were removed from CanisterStatusResultV2 (candid, old struct, new struct) and DefiniteCanisterSettingsArgs (candid, old struct, new struct, you might have to click to expand the diff).
    1. CanisterStatusResultV2::freezing_threshold and CanisterStatusResultV2::balance are removed as they are duplicated inside CanisterStatusResultV2::settings.
    2. CanisterStatusResultV2::controller and CanisterStatusResultV2::settings::controller are removed as they have invalid semantics (canisters can have multiple or zero controllers). Instead of these fields, the field CanisterStatusResultV2::settings::controllers should be used to get a canister’s controllers
  2. SNS governance’s get_root_canister_status is being removed, because its is subsumed by get_sns_canisters_summary (which also returns the root canister status)

How to prevent breakage:

  1. Instead of using CanisterStatusResultV2::freezing_threshold or CanisterStatusResultV2::balance, use the fields of the same name inside CanisterStatusResultV2::settings instead. These are CanisterStatusResultV2::settings::freezing_threshold and CanisterStatusResultV2::settings::balance.
  2. Do not use CanisterStatusResultV2::controller or CanisterStatusResultV2::settings::controller. Instead, to get the canister’s controllers, use CanisterStatusResultV2::settings::controllers
  3. Use SNS Root’s get_sns_canisters_summary instead of SNS’s Governance’s get_root_canister_status.

Target date for submitting the proposal to publish these changes to SNS-WASM: May 26th, 2023.

Proposals to be Submitted

Governance

## Proposal to Publish the SNS Governance Canister WASM to SNS-W
### Proposer: DFINITY Foundation
### Canister Type: governance
### Git Hash: a1f503d20b7846375c74ce5f7d0f8f6620ab7511
### New Wasm Hash: c3e4d1436aa8d59ce62d3bf3ce0e08f6607eb35625edcf5a4e89e26d8a284577
---
## Features

1. Profiling has been added to manage_neuron, giving greater visibility into which code paths are most responsible for cycles consumption. This will help developers identify and improve performance issues. The profiling information will be available in /metrics
2. Proposal payloads are now displayed in a more readable format
3. `get_proposal` now omits the proposal payload if it’s too large, which will fix the issue where large payloads would prevent the `get_proposal` response from fitting under the message size limit.
4. Added maturity modulation to the SNS

## Release Notes
```
$ git log --format="%C(auto) %h %s" 932c1bfc04728783a815e0867b579c1eb26df99d..a1f503d20b7846375c74ce5f7d0f8f6620ab7511 --  ./rs/sns/governance
 8e7610cc7c feat: NNS1-2252: Decimate over-sized fields from get_proposal response in SNS governance.
 81ebc50f0e refactor: Vote cascading in NNS.
 8614235156 Restore governance's get_root_canister_status for now
 5a1e4b551e fix: Typo "the fetched value does not get *used*"
 2c33ae629a feat: NNS1-1829, NNS1-2021: Add maturity modulation to SNS.
 39c2dee156 NNS1-2170: No longer transmit deprecated fields of CanisterStatusResultV2
 55d82f0686 Refactor nervous_system_root in preparation for more structs
 a7ce41a95f NNS1-2178: Add endpoint to manually fail stalled UpgradeSnsToNextVersion proposals in SNS Governance
 850a1700fd Add profiling to calls made by manage_neuron
 ea01c3da11 NNS1-2175: Pretty-print proposal contents to make them more readable
 c57dd33937 Expose get_latest_reward_event in candid
 d771af7c2a NNS1-2155: add `rounds_since_last_distribution` field to RewardEvent
 6d7bdd8aeb fix(NNS1-2145): Neuron baskets should follow on the unspecified topic (attempt 2)
 293fc246f7 Prevent updating SNS neuron permissions via update_neuron
 5040382bd5 Merge branch 'sns-voting-rewards-extreme-parameters-daniel-wong' into 'master'
 b16734231f docs: Added a tiny comment about how a piece of code is just being defensive, and the condition is not expected to occur in practice.
 cdb86c56ad FI-658 Restructure icrc ledger types repository
 2c5d34bafe feat: NNS1-1582: Added validation and tests for SNS voting rewards.
 023a3605bc Merge branch 'restructure-gen-dir' into 'master'
 3b3a84d5cf IDX-2737 - Change `gen` directory location into `src/` for `rust-analyzer`
 3586c244f2 Fix typos in NNS and SNS comments
 bcd3bbbb10 GIX-1169: Rename unspecified nervous function
 71216c5356 NNS1-2160: Add profiling for governance canister heartbeat
 d41590783f [NNS1-2148] SNS voting should ignore empty followees
 7898b44d03 make it possible to reinstall sns controlled canisters
 949407ea4a feat: move icrc1 agent to a standalone icrc-ledger-agent library
 4d28dbbe87 NNS1-2122: Remove more panics from code
 45183ca9dd feat: switch icrc1 ledger to the types from the icrc-ledger-types library.
 976c20cf9e NNS1-2122: Handle some more panics and errors
 8c5018d996 NNS1-2122: Handle some panics
 b6c3955cfa [NNS1-2125] Should_distribute_rewards now checks all distrbiute_rewards preconditions
 1163dbe9cc Merge branch '@anchpop/NNS1-2128' into 'master'
 fa6a1714d3 NNS1-2128: Ensure NeuronPermissionList's `Display` impl works and won't panic
 f50e1d802c Write a test that demonstrates a neuron can follow itself and will override the "catch-all" following behavior
 9587cc9e11 NNS1-959: NNS proposal votes should not be able to be registered after the proposal deadline
 2f95ea4d37 NNS1-1591: Prevent voting on SNS proposals after the deadline has passed
 9d304729ac hide update_neuron in SNS-governance behind test flag
 fa7d5081af add method update_neuron to SNS governance canister for testing
```
## Wasm Verification
Verify that the hash of the gzipped WASM matches the proposed hash.
```
git fetch
git checkout a1f503d20b7846375c74ce5f7d0f8f6620ab7511
./gitlab-ci/container/build-ic.sh -c
sha256sum ./artifacts/canisters/sns-governance-canister.wasm.gz
```

Root

## Proposal to Publish the SNS Root Canister WASM to SNS-W
### Proposer: DFINITY Foundation
### Canister Type: root
### Git Hash: a1f503d20b7846375c74ce5f7d0f8f6620ab7511
### New Wasm Hash: cc8d5986cb48043b47176510b357e55f6c2788689d451f25ece27268a94ae6f3
---
## Features

1. A new "controllers" field has been added to the `CanisterStatusResultV2`. This should be used instead of the old “controller” field.
2. Deprecated fields of CanisterStatusResultV2 are no longer transmitted
3. The process of retrieving summaries for SNS canisters in `get_sns_canisters_summary` now makes calls in parallel. This should result in quicker responses and better performance when fetching information about canisters.
4. Provide an NNS Root API to allow SNS-W to change controllers of a canister that SNS Root controls.

## Release Notes
```
$ git log --format="%C(auto) %h %s" 932c1bfc04728783a815e0867b579c1eb26df99d..a1f503d20b7846375c74ce5f7d0f8f6620ab7511 --  ./rs/sns/root
 39c2dee156 NNS1-2170: No longer transmit deprecated fields of CanisterStatusResultV2
 26ecbcbe5d NNS1-1926: Provide an NNS Root API to allow SNS-W to change controllers of a canister that root controls.
 55d82f0686 Refactor nervous_system_root in preparation for more structs
 787ad8b88d NNS1-1925 - Add the `controllers` field to the CanisterStatusResult served by NNS Root `canister_status` API
 d64ada9b05 NNS1-2115: Parallelize calls to owned canisters in get_sns_canisters_summary
 cdb86c56ad FI-658 Restructure icrc ledger types repository
 3b3a84d5cf IDX-2737 - Change `gen` directory location into `src/` for `rust-analyzer`
 45183ca9dd feat: switch icrc1 ledger to the types from the icrc-ledger-types library.
```
## Wasm Verification
Verify that the hash of the gzipped WASM matches the proposed hash.
```
git fetch
git checkout a1f503d20b7846375c74ce5f7d0f8f6620ab7511
./gitlab-ci/container/build-ic.sh -c
sha256sum ./artifacts/canisters/sns-root-canister.wasm.gz
```

Swap

## Proposal to Publish the SNS Swap Canister WASM to SNS-W
### Proposer: DFINITY Foundation
### Canister Type: swap
### Git Hash: a1f503d20b7846375c74ce5f7d0f8f6620ab7511
### New Wasm Hash: 9ed73e1547a29255d28878f40da303b9069119e4c8d73ac5e8295b300777f358
---
## Features

1. New fields have been added to Swap's DerivedState, to give more information about the current state of the swap (this information was already available in the metrics, this just makes it available to other canisters)

## Release Notes
```
$ git log --format="%C(auto) %h %s" 932c1bfc04728783a815e0867b579c1eb26df99d..a1f503d20b7846375c74ce5f7d0f8f6620ab7511 --  ./rs/sns/swap
 a4c2a5597b Make Swap's DerivedState fields optional to preserve backwards compatibility [override-didc-check]
 4cb4d205a1 Merge branch 'arshavir/NNS1-2222-2' into 'master'
 c5f7c8b152 feat(NNS1-2222): Support restricted countries as an initialization argument of an SNS-swap canister (attempt 2)
 176168b891 NNS1-2237: add participant count information to swap's derived_state
 aeb7ab92b4 feat(NNS1-2244) Extend `refresh_buyer_tokens` to support (optional) confirmation text
 3d4752b2a7 feat(NNS1-2223): Add optional confirmation text to SNS init payload
 cdb86c56ad FI-658 Restructure icrc ledger types repository
 3b3a84d5cf IDX-2737 - Change `gen` directory location into `src/` for `rust-analyzer`
 1f363b7145 NNS1-1789: Aborted sales clear the buyer state
 b788aac26c Merge branch '@anchpop/release-candidate-min-participants-fix' into 'master'
 5fb93f5af1 release candidate fix: bump ceiling for min_participants to 500
 45183ca9dd feat: switch icrc1 ledger to the types from the icrc-ledger-types library.
 3dbb180844 Merge branch 'NNS1-2124' into 'master'
 5bab7b1746 [NNS1-2124] Change the Sale canister's claim_swap_neurons batch limit to a const
 275e19afc3 [NNS1-2112][NNS1-2118] Enhance the sale canister metrics
```
## Wasm Verification
Verify that the hash of the gzipped WASM matches the proposed hash.
```
git fetch
git checkout a1f503d20b7846375c74ce5f7d0f8f6620ab7511
./gitlab-ci/container/build-ic.sh -c
sha256sum ./artifacts/canisters/sns-swap-canister.wasm.gz
```
1 Like

The proposals are here!
SNS Governance: Proposal: 122622 - IC Dashboard
SNS Root: Proposal: 122623 - IC Dashboard
SNS Swap: Proposal: 122624 - IC Dashboard

Keen-eyed readers may notice that the changelog for Root was edited to remove “Provide an NNS Root API to allow SNS-W to change controllers of a canister that SNS Root controls.” This was removed from the proposal text because it pertains to NNS root, not SNS root. (The change did touch SNS root, but didn’t change SNS root’s observable behavior.) This edit is just a cosmetic change to the proposal text – the canister wasm hash in the proposal matches the one posted here.

1 Like