I have been using dfx extension install nns to install a local version of the NNS that I can use for my pic.js tests.
However, since new features are pushed all the time to the NNS / SNS. It looks like I have an outdated version that doesn’t include, periodic confirmation, the new List neurons API and SNS topics. Is there a way I can specify the latest state of the NNS to use so I can update my tests with the latest features?
HI @aterga !
Could you please help me figure out how to install the latest version of nns-dapp_test.wasm, for example from proposal 138366?
I’m using the following commands (commit from 138366):
dfx start --clean
DFX_IC_COMMIT=e91bdc380d234ed4060f63d50fafe4bbfeda9c70 dfx extension run nns install
As a result, I get errors like this:
...
Installation of wasm into canister with ID: rrkah-fqaaa-aaaaa-aaaaq-cai failed with: unexpected result: “rejected” - Some(“Error from Canister rrkah-fqaaa-aaaaa-aaaaq-cai: Canister’s Wasm module is not valid: Failed to decode wasm module: unsupported canister module format.\nThis is likely an error with the compiler/CDK toolchain being used to build the canister. Please report the error to IC devs on the forum: https://forum.dfinity.org and include which language/CDK was used to create the canister.”)
Installation of wasm into canister with ID: rwlgt-iiaaa-aaaaa-aaaaa-cai failed with: unexpected result: “rejected” - Some(“Error from Canister rwlgt-iiaaa-aaaaa-aaaaa-cai: Canister’s Wasm module is not valid: Failed to decode wasm module: unsupported canister module format.\nThis is likely an error with the compiler/CDK toolchain being used to build the canister. Please report the error to IC devs on the forum: https://forum.dfinity.org and include which language/CDK was used to create the canister.”)
Installation of wasm into canister with ID: ryjl3-tyaaa-aaaaa-aaaba-cai failed with: unexpected result: “rejected” - Some(“Error from Canister ryjl3-tyaaa-aaaaa-aaaba-cai: Canister’s Wasm module is not valid: Failed to decode wasm module: unsupported canister module format.\nThis is likely an error with the compiler/CDK toolchain being used to build the canister. Please report the error to IC devs on the forum: https://forum.dfinity.org and include which language/CDK was used to create the canister.”)
...
So it doesn’t work.
If I run a clean NNS install without a commit:
dfx start --clean
dfx extension run nns install
Result is successful with one issue:
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/internet_identity_dev.wasm
from: https://github.com/dfinity/internet-identity/releases/download/release-2024-05-13/internet_identity_dev.wasm.gz
Installed internet_identity at qhbym-qaaaa-aaaaa-aaafq-cai
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/nns-dapp_test.wasm
from: https://github.com/dfinity/nns-dapp/releases/download/proposal-129748/nns-dapp_test.wasm.gz
Installed nns-dapp at qsgjb-riaaa-aaaaa-aaaga-cai
Notice that it always falls back to proposal-129748, regardless of which dfx version I use.
I’ve tried 0.24.0, 0.25.1, and 0.29.1 — the result is always the same.
Extension 'nns' version 0.5.3 installed successfully
Installing NNS:
DFX_IC_COMMIT=c5dee3a11b79da7b5c433574f38605d75c9feaf5 dfx extension run nns install
Checking out the environment...
Installing the core backend wasm canisters...
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/registry-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/registry-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/governance-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/governance-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/governance-canister_test.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/governance-canister_test.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ledger-canister_notify-method.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ledger-canister_notify-method.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/root-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/root-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/cycles-minting-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/cycles-minting-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/lifeline_canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/lifeline_canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/genesis-token-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/genesis-token-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/identity-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/identity-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/nns-ui-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/nns-ui-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-ckbtc-minter.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-ckbtc-minter.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/sns-wasm-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/sns-wasm-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-ledger.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-icrc1-ledger.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-index-ng.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-icrc1-index-ng.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icp-index-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-icp-index-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/sns-root-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/sns-root-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/sns-governance-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/sns-governance-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/sns-swap-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/sns-swap-canister.wasm.gz
Already downloaded: /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-ledger.wasm
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-archive.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-icrc1-archive.wasm.gz
Already downloaded: /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-index-ng.wasm
[ic-nns-init] The registry will be initialized with 1 transactions for a total of 19 key-value pair mutations.
[ic-nns-init] Initial neuron CSV or PB path not specified, initializing with test neurons
[ic-nns-init] Initializing with test ledger account: 5b315d2f6702cb3a27d826161797d7b2c2e131cd312aece51d4d5574d1247087
[ic-nns-init] Initializing with test ledger account: 2b8fbde99de881f695f279d2a892b1137bfe81a42d7694e064b1be58701e1138
[ic-nns-init] Initialized governance.
Compiling Wasm for registry-canister in task on thread: ThreadId(14)
looking up registry-canister at REGISTRY_CANISTER_WASM_PATH
Using pre-built binary for registry-canister with features: [] (size = 1293688, path = /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/registry-canister.wasm)
Compiling Wasm for governance-canister in task on thread: ThreadId(14)
looking up governance-canister at GOVERNANCE_CANISTER_TEST_WASM_PATH
Compiling Wasm for ledger-canister in task on thread: ThreadId(15)
looking up ledger-canister at LEDGER_CANISTER_NOTIFY_METHOD_WASM_PATH
Done compiling the wasm for registry-canister
Using pre-built binary for governance-canister with features: ["test"] (size = 1667658, path = /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/governance-canister_test.wasm)
Using pre-built binary for ledger-canister with features: ["notify-method"] (size = 887798, path = /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ledger-canister_notify-method.wasm)
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: rwlgt-iiaaa-aaaaa-aaaaa-cai
wasm_module: <1293688 bytes>
arg: <11173 bytes>
compute_allocation: None
memory_allocation: Some("4_294_967_296")
}
Done compiling the wasm for governance-canister
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: rrkah-fqaaa-aaaaa-aaaaq-cai
wasm_module: <1667658 bytes>
arg: <3961 bytes>
compute_allocation: None
memory_allocation: Some("10_737_418_240")
}
Done compiling the wasm for ledger-canister
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: ryjl3-tyaaa-aaaaa-aaaba-cai
wasm_module: <887798 bytes>
arg: <958 bytes>
compute_allocation: None
memory_allocation: Some("4_294_967_296")
}
Successfully installed wasm into canister with ID: rwlgt-iiaaa-aaaaa-aaaaa-cai
Installed rwlgt-iiaaa-aaaaa-aaaaa-cai with registry-canister
Installation of wasm into canister with ID: rrkah-fqaaa-aaaaa-aaaaq-cai failed with: unexpected result: "rejected" - Some("Error from Canister rrkah-fqaaa-aaaaa-aaaaq-cai: Canister called `ic0.trap` with message: 'Panicked at 'Couldn't initialize canister.: DecodeError { description: \"invalid wire type: EndGroup (expected LengthDelimited)\", stack: [(\"Governance\", \"economics\")] }', rs/nns/governance/canister/canister.rs:178:6'\nCanister Backtrace:\nunknown function at index 4709\nunknown function at index 2592\nunknown function at index 3654\nunknown function at index 3734\nunknown function at index 4909\nunknown function at index 4145\nunknown function at index 4136\nunknown function at index 3819\nunknown function at index 38\n.\nConsider gracefully handling failures from this canister or altering the canister to handle exceptions. See documentation: https://internetcomputer.org/docs/current/references/execution-errors#trapped-explicitly")
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: rrkah-fqaaa-aaaaa-aaaaq-cai
wasm_module: <1667658 bytes>
arg: <3961 bytes>
compute_allocation: None
memory_allocation: Some("10_737_418_240")
}
Successfully installed wasm into canister with ID: ryjl3-tyaaa-aaaaa-aaaba-cai
Installed ryjl3-tyaaa-aaaaa-aaaba-cai with ledger-canister
Installation of wasm into canister with ID: rrkah-fqaaa-aaaaa-aaaaq-cai failed with: unexpected result: "rejected" - Some("Error from Canister rrkah-fqaaa-aaaaa-aaaaq-cai: Canister called `ic0.trap` with message: 'Panicked at 'Couldn't initialize canister.: DecodeError { description: \"invalid wire type: EndGroup (expected LengthDelimited)\", stack: [(\"Governance\", \"economics\")] }', rs/nns/governance/canister/canister.rs:178:6'\nCanister Backtrace:\nunknown function at index 4709\nunknown function at index 2592\nunknown function at index 3654\nunknown function at index 3734\nunknown function at index 4909\nunknown function at index 4145\nunknown function at index 4136\nunknown function at index 3819\nunknown function at index 38\n.\nConsider gracefully handling failures from this canister or altering the canister to handle exceptions. See documentation: https://internetcomputer.org/docs/current/references/execution-errors#trapped-explicitly")
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: rrkah-fqaaa-aaaaa-aaaaq-cai
wasm_module: <1667658 bytes>
arg: <3961 bytes>
compute_allocation: None
memory_allocation: Some("10_737_418_240")
}
Installation of wasm into canister with ID: rrkah-fqaaa-aaaaa-aaaaq-cai failed with: unexpected result: "rejected" - Some("Error from Canister rrkah-fqaaa-aaaaa-aaaaq-cai: Canister called `ic0.trap` with message: 'Panicked at 'Couldn't initialize canister.: DecodeError { description: \"invalid wire type: EndGroup (expected LengthDelimited)\", stack: [(\"Governance\", \"economics\")] }', rs/nns/governance/canister/canister.rs:178:6'\nCanister Backtrace:\nunknown function at index 4709\nunknown function at index 2592\nunknown function at index 3654\nunknown function at index 3734\nunknown function at index 4909\nunknown function at index 4145\nunknown function at index 4136\nunknown function at index 3819\nunknown function at index 38\n.\nConsider gracefully handling failures from this canister or altering the canister to handle exceptions. See documentation: https://internetcomputer.org/docs/current/references/execution-errors#trapped-explicitly")
...
...
...
Installation with commit “c5dee3a11b79da7b5c433574f38605d75c9feaf5” from @aterga’s comment (proposal 135933), as well as with commit “e91bdc380d234ed4060f63d50fafe4bbfeda9c70” (proposal 138366) – doesn’t work.
From what I see in the file CHANGELOG.md, the NNS and Internet Identity versions were last updated in 0.4.1 — exactly the versions that get installed now.
Would it be possible to update these dependencies so we can use the latest NNS features locally?
$ dfx extension list
No extensions installed.
$ dfx extension install nns --version 0.5.3
Extension ‘nns’ version 0.5.3 installed successfully
$ dfx extension install nns --version 0.5.4
ERROR: Extension ‘nns’ is already installed at version 0.5.3
ERROR: To upgrade, run “dfx extension uninstall nns” and then re-run the dfx extension install command
Error: Different version already installed
Then, to get the latest,
$ dfx extension uninstall nns
$ dfx extension list
No extensions installed.
$ dfx extension install nns --version 0.5.4
Extension 'nns' version 0.5.4 installed successfully
I followed the recommended steps and started a fresh replica in another terminal:
$ dfx start --clean (in a separate terminal)
$ dfx --version
dfx 0.25.1
$ dfx extension list
Installed extensions:
nns
$ dfx extension uninstall nns
$ dfx extension list
No extensions installed.
$ dfx extension install nns --version 0.5.3
Extension 'nns' version 0.5.3 installed successfully
$ dfx extension list
Installed extensions:
nns
$ dfx extension install nns --version 0.5.4
ERROR: Extension 'nns' is already installed at version 0.5.3
ERROR: To upgrade, run "dfx extension uninstall nns" and then re-run the dfx extension install command
Error: Different version already installed
$ dfx extension uninstall nns
$ dfx extension list
No extensions installed.
$ dfx extension install nns --version 0.5.4
Extension 'nns' version 0.5.4 installed successfully
$ dfx extension list
Installed extensions:
nns
$ dfx cache delete
But when I try to install NNS again, I still get the same error:
$ DFX_IC_COMMIT=c5dee3a11b79da7b5c433574f38605d75c9feaf5 dfx extension run nns install
Checking out the environment...
Installing the core backend wasm canisters...
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/registry-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/registry-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/governance-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/governance-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/governance-canister_test.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/governance-canister_test.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ledger-canister_notify-method.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ledger-canister_notify-method.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/root-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/root-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/cycles-minting-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/cycles-minting-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/lifeline_canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/lifeline_canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/genesis-token-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/genesis-token-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/identity-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/identity-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/nns-ui-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/nns-ui-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-ckbtc-minter.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-ckbtc-minter.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/sns-wasm-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/sns-wasm-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-ledger.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-icrc1-ledger.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-index-ng.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-icrc1-index-ng.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icp-index-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-icp-index-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/sns-root-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/sns-root-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/sns-governance-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/sns-governance-canister.wasm.gz
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/sns-swap-canister.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/sns-swap-canister.wasm.gz
Already downloaded: /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-ledger.wasm
Downloading /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-archive.wasm
from .gz: https://download.dfinity.systems/ic/c5dee3a11b79da7b5c433574f38605d75c9feaf5/canisters/ic-icrc1-archive.wasm.gz
Already downloaded: /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ic-icrc1-index-ng.wasm
[ic-nns-init] The registry will be initialized with 1 transactions for a total of 19 key-value pair mutations.
[ic-nns-init] Initial neuron CSV or PB path not specified, initializing with test neurons
[ic-nns-init] Initializing with test ledger account: 5b315d2f6702cb3a27d826161797d7b2c2e131cd312aece51d4d5574d1247087
[ic-nns-init] Initializing with test ledger account: 2b8fbde99de881f695f279d2a892b1137bfe81a42d7694e064b1be58701e1138
[ic-nns-init] Initialized governance.
Compiling Wasm for registry-canister in task on thread: ThreadId(14)
looking up registry-canister at REGISTRY_CANISTER_WASM_PATH
Using pre-built binary for registry-canister with features: [] (size = 1293688, path = /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/registry-canister.wasm)
Compiling Wasm for governance-canister in task on thread: ThreadId(14)
looking up governance-canister at GOVERNANCE_CANISTER_TEST_WASM_PATH
Compiling Wasm for ledger-canister in task on thread: ThreadId(15)
looking up ledger-canister at LEDGER_CANISTER_NOTIFY_METHOD_WASM_PATH
Done compiling the wasm for registry-canister
Using pre-built binary for ledger-canister with features: ["notify-method"] (size = 887798, path = /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/ledger-canister_notify-method.wasm)
Using pre-built binary for governance-canister with features: ["test"] (size = 1667658, path = /Users/alexeychirkov/.cache/dfinity/versions/0.25.1/wasms/governance-canister_test.wasm)
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: rwlgt-iiaaa-aaaaa-aaaaa-cai
wasm_module: <1293688 bytes>
arg: <11173 bytes>
}
Done compiling the wasm for governance-canister
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: rrkah-fqaaa-aaaaa-aaaaq-cai
wasm_module: <1667658 bytes>
arg: <4021 bytes>
}
Done compiling the wasm for ledger-canister
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: ryjl3-tyaaa-aaaaa-aaaba-cai
wasm_module: <887798 bytes>
arg: <958 bytes>
}
Successfully installed wasm into canister with ID: rwlgt-iiaaa-aaaaa-aaaaa-cai
Installed rwlgt-iiaaa-aaaaa-aaaaa-cai with registry-canister
Installation of wasm into canister with ID: rrkah-fqaaa-aaaaa-aaaaq-cai failed with: unexpected result: "rejected" - Some("Error from Canister rrkah-fqaaa-aaaaa-aaaaq-cai: Canister called `ic0.trap` with message: 'Panicked at 'Couldn't initialize canister.: DecodeError { description: \"invalid wire type: EndGroup (expected LengthDelimited)\", stack: [(\"Governance\", \"economics\")] }', rs/nns/governance/canister/canister.rs:178:6'\nCanister Backtrace:\nunknown function at index 4709\nunknown function at index 2592\nunknown function at index 3654\nunknown function at index 3734\nunknown function at index 4909\nunknown function at index 4145\nunknown function at index 4136\nunknown function at index 3819\nunknown function at index 38\n.\nConsider gracefully handling failures from this canister or altering the canister to handle exceptions. See documentation: https://internetcomputer.org/docs/current/references/execution-errors#trapped-explicitly")
Successfully installed wasm into canister with ID: ryjl3-tyaaa-aaaaa-aaaba-cai
Installed ryjl3-tyaaa-aaaaa-aaaba-cai with ledger-canister
Install args: InstallCodeArgs {
mode: Reinstall
canister_id: rrkah-fqaaa-aaaaa-aaaaq-cai
wasm_module: <1667658 bytes>
arg: <4021 bytes>
}
Not sure what error you are seeing. From briefly scanning the output that you shared, it looks like nothing went wrong. I seem to be misunderstanding the problem.
PS: I was not trying to say you need to run the first set of commands that I mentioned. I was demonstrating how if you try to install a newer version of an extension while you have an older one installed, dfx complains. At the same time, it also suggests what I was saying: uninstall the old extension before installing a newer version. My second set of commands shows how following the suggestion gets past the problem.
There has recently been a release of the dfx sns extension 0.6.0, and usually these go together with a release of the dfx nns extension. I think the latter was skipped this time for some reason, and the latest available version (0.5.4) is now broken.
The team is aware that you’re blocked on this and will prioritize resolving this as soon as possible. For now, if you could describe your use case, maybe I or someone else would be able to provide a workaround that’s doesn’t require dfx nns.
Our use case is the following: we want to locally test a canister that interacts with ICP neurons. For this, we need the latest version of NNS (backend+frontend) so that from the frontend side we can perform all currently available actions with neurons and verify all possible neuron states.
In the meantime, the new NNS extension 0.6.0 has been released. However, the versions of the frontend canisters, e.g., Internet Identity and NNS dapp, are hard coded in the extension code, unfortunately, and they have not been bumped yet. (One could upgrade the canisters to any Wasm, for example, using the latest NNS dapp release, but this requires advanced ICP skills).
This will add a new option --system-canisters for dfx start that will correctly pre-configure and install relevant versions of all “system” canisters to the local network. The only current limitation is that this won’t install the NNS dapp just yet (there’s a ticket for it, but I don’t have an ETA for you yet). I’ll update this thread once I know more about the ETAs.
so that from the frontend side we can perform all currently available actions with neurons and verify all possible neuron states
For now, I would recommend testing neuron actions using the API, for example, by sending DFX commands directly to the Governance canister (e.g., the manage_neuron function). Let us know if you’d like to explore this route but arent’ sure where to start.
Yes, I’d like to get help with sending DFX commands to the Governance canister and managing neurons via the API.
The best tool for that is probably quill. Here is a summary of its capabilities:
$ ./quill
Ledger & Governance ToolKit for cold wallets
Usage: quill [OPTIONS] <COMMAND>
Commands:
public-ids Prints the principal and the account IDs
send Sends a signed message or a set of messages
transfer Signs an ICP transfer transaction
claim-neurons Claim seed neurons from the Genesis Token Canister
neuron-stake Signs topping up of a neuron (new or existing)
neuron-manage Signs a neuron configuration change
list-neurons Signs the query for all neurons belonging to the signing principal
list-proposals Queries for a list of pending proposals
get-proposal-info
get-neuron-info Queries for information about a neuron, such as its voting power and age
account-balance Queries a ledger account balance
update-node-provider Update node provider details
replace-node-provider-id Signs a message to replace Node Provide ID in targeted Node Operator Record
ckbtc Commands for chain-key bitcoin (ckBTC)
sns Commands for interacting with a Service Nervous System's Ledger & Governance canisters
generate Minimalistic ledger and governance toolkit for cold wallets.
decrypt-pem Decrypts an encrypted PEM file for use with other tools
scanner-qr-code Print QR Scanner dapp QR code: scan to start dapp to submit QR results
qr-code Print QR code for data e.g. principal id
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
COMMON:
--pem-file <PEM_FILE> Path to your PEM file (use "-" for STDIN)
--password-file <PASSWORD_FILE> If the PEM file is encrypted, read the password from this file (use "-" for STDIN)
--hsm Use a hardware key to sign messages
--hsm-libpath <HSM_LIBPATH> Path to the PKCS#11 module to use. Defaults to /Library/OpenSC/lib/pkcs11/opensc-pkcs11.so
--hsm-slot <HSM_SLOT> The slot that the hardware key is in. If OpenSC is installed, `pkcs11-tool --list-slots`
--hsm-id <HSM_ID> The ID of the key to use. Consult your hardware key's documentation
--ledger Authenticate using a Ledger hardware wallet
--qr Output the result(s) as UTF-8 QR codes
--insecure-local-dev-mode Fetches the root key before making requests so that interfacing with local instances is possible. DO NOT USE WITH ANY REAL INFORMATION
I think the key for your use case is the --insecure-local-dev-mode flag.
Does that do what you want? If not, what’s missing?
quill is designed for people who (for security reasons) store their credentials on an a computer with no connection to the Internet. As a result, for people who do not do that, operating it takes steps that seem extraneous. From the README:
To support cold wallets, quill takes a two-phase approach to sending query/update calls to the IC. In the first phase, quill is used with the various subcommands to generate and sign messages based on user input, without needing access to the internet. In the second phase, the signed message(s) are sent to the IC.
After this, you should be able to open the local version of the NNS dapp (http://qoctq-giaaa-aaaaa-aaaea-cai.localhost:4943/) in your web browser and manage from there. Please let us know if this works for you.