NNS Updates: Nov 10, 2023 (Matched Funding for SNS Swaps, Stable Memory Migration for NNS Neurons)

The NNS Team will be submitting the following upgrade proposal today, 2023-11-10. DFINITY plans to vote in favor of this proposal on Monday, 2023-11-13.

This release

Matched Funding for the Neurons’ Fund participation in SNS decentralization swaps.

  • Shift from a fixed ICP amount to a model where the fund’s contribution to SNS swaps scales with direct participation.

  • Breaking changes for sns_init.yaml / SnsInitPayload:

    • Disallow (min|max)_icp when Matched Funding is enabled. Instead, use (min|max)_direct_participation_icp.
    • Disallow neurons_fund_investment_icp. Instead, set neurons_fund_participation : bool.
    • minimum_participants now refers to only direct participants (before this field indicated the number of direct + Neurons’ Fund participants).
  • For more details, please refer to the forum post (Suggested enhancements to the Community fund - #7 by bjoernek) and the Proposal: 124822 - ICP Dashboard

Stable Storage Migration for Inactive NNS Neurons

  • The NNS Governance will begin copying inactive neurons to stable memory.

  • This should have no externally visible impact, and is part of a longer term effort to make the canister more scalable.

Proposal to be Submitted

NNS Governance


## Proposal to Upgrade the Governance Canister

### Proposer: DFINITY Foundation

### Git Hash: 751b2a0cf904934b4afb62b1457f6bf4f0a20275

### New Wasm Hash: 371a96090299d73ff243119d127694569f28b7585c23975d8637fd5d5c00b7fc

### Target canister: rrkah-fqaaa-aaaaa-aaaaq-cai

---

## Features

* Activated migration of inactive neurons into stable storage.

* Matched Funding: instead of a fixed amount, the Neurons' Fund now matches the amount from direct participants, using a nonlinear function.

* Better support for auditing how the Neurons’ Fund participates in SNS decentralization Swaps via the new NNS Governance endpoint `get_neurons_fund_audit_info`.

## Release Notes

```

$ git log --format="%C(auto) %h %s" 0d8ec8daddaa03b5d5f972d68acb0a7697729bba..751b2a0cf904934b4afb62b1457f6bf4f0a20275 -- ./rs/nns/governance

84496ea876 feat(NNS1-2592): Matched Funding / Support `neurons_fund_participation` and deprecate `neurons_fund_investment` in ic-admin

1bbb44e4e0 feat(NNS): Matched Funding / Ensure tests pass regardless of whether `IS_MATCHED_FUNDING_ENABLED`

99a9ef5065 Merge branch 'jason/NNS1-2551' into 'master'

5044168043 feat: NNS1-2551 Turn on inactive neuron copying

5b318a1ad9 Merge branch 'jason/remove-inactive-neuron-cardinality' into 'master'

061a5c6eca feat: Remove inactive neuron cardinality validation

d18ac08908 feat(NNS1-2591): Matched Funding / Compute `NeuronsFundParticipationConstraints`

55c62cee38 chore: NNS1-2510 Document the invariant regarding active/inactive neurons

74c51690ff feat: NNS1-2704 Clean up neuron indexes migration

ae85c99ef6 Merge branch 'arshavir/deprecate-neurons_fund_investment_icp' into 'master'

5d6ac9033f chore(SNS): Matched Funding / Disallow `neurons_fund_investment_icp` when Matched Funding is used

f2a7e93a18 feat: NNS1-2622 Change followees storage schema to allow duplicates

8daa989e76 feat: NNS1-2618 Implement NeuronStore logic to add/remove neurons from stable neuron store if needed

63608cbbe3 Merge branch '@anchpop/voting_eligible_neurons-iter' into 'master'

98fa57ff28 Refactor voting_eligible_neurons to return an iterator

6d70fb0300 fix(NNS): Matched Funding / Assign `max_neurons_fund_participation_icp_e8s` to a more precise value

5cc298a9dd feat(NNS): Matched Funding / Add field `allocated_neurons_fund_participation_icp_e8s` to `NeuronsFundParticipation`

86284fbc6c feat(NNS): Matched Funding / Add NNS Governance endpoint `get_neurons_fund_audit_info` [override-didc-check]

773cea57a3 Merge branch 'arshavir/NNS1-2619-2' into 'master'

f954401302 feat(NNS1-2619): Matched Funding / Adjust Neurons' Fund participation thresholds and add tests for `PolynomialMatchingFunction`

88c500e4dc feat(nns): Scrub deprecated topics from NNS Governance's APIs

```

## Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

```

git fetch

git checkout 751b2a0cf904934b4afb62b1457f6bf4f0a20275

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

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

```

## Current Version

- Current Git Hash: 0d8ec8daddaa03b5d5f972d68acb0a7697729bba

- Current Wasm Hash: 59744b5a9833c747d324316f7b5fc62f725e6eba48e9733da3d26e4b811a7aaa

SNS-W


## Proposal to Upgrade the Sns-wasm Canister

### Proposer: DFINITY Foundation

### Git Hash: 751b2a0cf904934b4afb62b1457f6bf4f0a20275

### New Wasm Hash: df5d2dd24efc9c7f7b0a5a23ef94271174806d46c93d6d2613363ff3c55afb9b

### Target canister: qaa6y-5yaaa-aaaaa-aaafa-cai

---

## Features

* No externally visible changes.

## Release Notes
```
$ git log --format="%C(auto) %h %s" 0d8ec8daddaa03b5d5f972d68acb0a7697729bba..751b2a0cf904934b4afb62b1457f6bf4f0a20275 --  ./rs/nns/sns-wasm

```

## Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

```

git fetch

git checkout 751b2a0cf904934b4afb62b1457f6bf4f0a20275

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

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

```

## Current Version

- Current Git Hash: 0d8ec8daddaa03b5d5f972d68acb0a7697729bba

- Current Wasm Hash: c07b57fac0037ae5e2e979e4217e88e05bd039e4be9f52a5a1b38582edc04b21

CMC


## Proposal to Upgrade the Cycles-minting Canister

### Proposer: DFINITY Foundation

### Git Hash: 751b2a0cf904934b4afb62b1457f6bf4f0a20275

### New Wasm Hash: 9355c7f33f97180108f0b9b5174e92524fd0e23e678a3406510ea096805fa65b

### Target canister: rkp4c-7iaaa-aaaaa-aaaca-cai

---

## Features

* Allow specifying a subnet on CMC for canister creation.

* Add `create_canister` to allow creating canisters using cycles.

* Add ability to specify canister settings in `notify_create`.

* Enable querying CMC for authorized principals and subnets.

## Release Notes

```

$ git log --format="%C(auto) %h %s" e813c43a337a26c026c2f2ec19099bd2036e7280..751b2a0cf904934b4afb62b1457f6bf4f0a20275 -- ./rs/nns/cmc

b968ee6288 refactor(IDX-3017): sync version of build-info and move to the workspace.

8b6c8d1b0f feat(release): Introduce workspace version

ab8783a919 refactor(IDX-3017): move serde to the workspace.

33b4bbbfd8 RUN-810: Switch `CanisterId::new` to infallable `CanisterId::unchecked_from_principal`

63bd1c173e fix: Bring cmc.did in sync with code

bb083881c5 feat(SDK-1260): allow specifying a subnet on CMC for canister creation

d1d7cc09ce feat(SDK-1237): CMC: add create_canister to allow creating canisters using cycles

70226d30e4 refactor: [IDX-3017] Update base64 and put it into workspace.

dd6829112e feat(NNS1-2430): CMC: add ability to specify canister settings in notify_create

78836a179a chore: use the global workspace for the version of the futures crate

9371e6fbd8 chore: use the global workspace for deriving the prost version

8b3323c1e0 Chore: Fix typos in nns code

68c57d1242 Update gazelle, go and buildifier toolchains.

5bdc1612a0 Merge branch 'NNS1-2361' into 'master'

191d7df2a1 fix(sns): Apply SNS maturity modulation at the end of the 7 day window

0ecb948723 chore: Update links to interface spec

3855fbb623 chore: bump rust to 1.71

2aaa82b6e9 feat(NNS1-1956): Enable querying CMC for authorized principals and subnets

8d2f376768 Implement various clippy warnings throughout our code.

3de7d413ea chore(build): unify versions of candid in Cargo files

90c8a01659 feat(ledger_core) add TokensType trait

211f587e4c Sort imports with crate import granularity

```

## Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

```

git fetch

git checkout 751b2a0cf904934b4afb62b1457f6bf4f0a20275

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

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

```

## Current Version

- Current Git Hash: e813c43a337a26c026c2f2ec19099bd2036e7280

- Current Wasm Hash: fc1655302a81cd1b7148a6f66479b2830bd0d567d04780720e7bdd6c5b124fb5

SNS Swap


## Proposal to Publish the SNS Swap Canister WASM to SNS-W

### Proposer: DFINITY Foundation

### Canister Type: swap

### Git Hash: 751b2a0cf904934b4afb62b1457f6bf4f0a20275

### New Wasm Hash: d8bd8cedc2042849acee11f8691d4dcac62fc904daffcf36879cb3912e3575e7

---

## Features

* Matched Funding

1. Swap reports the current Neurons’ Fund participation in real time, after each call to refresh_buyer_tokens.
2. `Swap.can_commit` now depends only on the amount of direct participation.
3. Breaking changes for sns_init.yaml / `SnsInitPayload`:
    - Disallow `(min|max)_icp` when Matched Funding is enabled. Instead, use `(min|max)_direct_participation_icp`.
    - Disallow `neurons_fund_investment_icp`. Instead, set `neurons_fund_participation : bool`.
    - `minimum_participants` now refers to only direct participants (before this field indicated the number of direct + Neurons’ Fund participants).

## Release Notes

```

$ git log --format="%C(auto) %h %s" d191e57a18cc146b9aa57722adcd4db007f4df5a..751b2a0cf904934b4afb62b1457f6bf4f0a20275 -- ./rs/sns/swap

a82db2e421 feat(Swap): Matched Funding / Cap `neurons_fund_participation_icp_e8s` estimation at `max_neurons_fund_participation_icp_e8s`

7fc3072e44 feat(NNS1-2558): Matched Funding / Add unit tests for `refresh_buyer_token_e8s` to check Neurons' Fund participation

8c9dc5bc26 Merge branch 'arshavir/NNS1-2620-2' into 'master'

b6e53dccd9 chore(SNS): Matched Funding / Reuse validation code for `SnsInitPayload.neurons_fund_participation_constraints` in SNS init

6d70fb0300 fix(NNS): Matched Funding / Assign `max_neurons_fund_participation_icp_e8s` to a more precise value

f954401302 feat(NNS1-2619): Matched Funding / Adjust Neurons' Fund participation thresholds and add tests for `PolynomialMatchingFunction`

9395d4ae5e Merge branch 'levsha/refactor-IDX-3017-sync-version-of-build-info-and-move-to-the-workspace-' into 'master'

b968ee6288 refactor(IDX-3017): sync version of build-info and move to the workspace.

f6595d2565 fix(SNS): Matched Funding / Ensure Swap's `can_commit` depends only on direct participation amount

8b6c8d1b0f feat(release): Introduce workspace version

b979e5bebc feat(NNS1-2570): Matched Funding / Update `Swap.neurons_fund_participation_icp_e8s` in `refresh_buyer_token_e8s`

ac3520d6ed chore(NNS1-2570): Matched Funding / Refactor Neurons' Fund

7cb38a9097 chore(SNS): Improve descriptiveness of errors in `Swap::Init::mk_open_sns_request`

31662b21a3 Merge branch 'arshavir/NNS1-2638' into 'master'

ffacc906e0 chore(NNS1-2638): Matched Funding / Ensure swap success criterium is based only on direct participation

ab8783a919 refactor(IDX-3017): move serde to the workspace.

9c4d943eaf Merge branch 'NNS1-2636-p2' into 'master'

28d18ccfd4 feat(sns): Matched Funding / Allow for Swap to call `settle_neruons_fund_participation`

5a9abf0bce refactor(IDX-3017) update pretty_assertions and move to the workspace.

9844e2b7ee refactor(IDX-3017): Update itertools and move to workspace.

d3647f124d NNS1-2590: Matched Funding / Disallow (min|max)_icp when matched funding is enabled

```

## Wasm Verification

Verify that the hash of the gzipped WASM matches the proposed hash.

```

git fetch

git checkout 751b2a0cf904934b4afb62b1457f6bf4f0a20275

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

sha256sum ./artifacts/canisters/sns-swap-canister.wasm.gz

```
3 Likes

Built and checked for matching hashes. Details on the
CodeGov DSCVR portal .

5 Likes

The following proposals (for upgrading NNS Governance, SNS-W, and Swap) have succeeded:

However, while the proposal for upgrading CMC (Proposal: 125600 - ICP Dashboard) has been adopted, the canister wasm did not get upgraded. This is because CMC requires an explicit initialization argument, and due to a bug in the upgrade proposal script, this argument was not set. There are no negative impacts, except that the CMC upgrade mentioned at the top of this thread will be postponed till next Monday (2023-11-20).

3 Likes