dfinity / dfx-extensions

Source repo for DFX extensions binaries and metadata
Apache License 2.0
8 stars 5 forks source link

fix: initialize the NNS registry canister properly #107

Closed mraszyk closed 1 month ago

mraszyk commented 5 months ago

This PR passes the local registry file to ic-nns-init so that the NNS registry canister is initialized properly.

Additionally, this PR bumps a couple of dependencies:

and changes the frontend canister type from sveltekit to simple-assets (as we aren't really testing any frontend stuff here).

mraszyk commented 3 months ago

CI is failing since the replicated state is now hidden under paths like d00f8424d1e07bd3b401218a9cbd0ff89488cddf44163d1b9050628514e314ce/state/replicated_state/ and I don't know how to retrieve the random-looking prefix from dfx.

mraszyk commented 3 months ago

Now the CI is failing with

# thread 'main' panicked at /home/runner/.cargo/git/checkouts/sdk-350d918e42409525/d8c1ede/src/dfx-core/src/config/model/local_server_descriptor.rs:177:18:
# settings_digest must be set
ericswanson-dfinity commented 3 months ago

Now the CI is failing with

# thread 'main' panicked at /home/runner/.cargo/git/checkouts/sdk-350d918e42409525/d8c1ede/src/dfx-core/src/config/model/local_server_descriptor.rs:177:18:
# settings_digest must be set

Unfortunately, there's no easy way to get the settings digest. It would be better if it was stored in the network-id file. I've filed a ticket to do this.

A way to find the settings digest would be to look for subdirectories of the network/local directory that contain a network-id file that has the same contents as network/local/network-id, for example

[~/Library/Application Support/org.dfinity.dfx/network/local] $ find . -depth 2 -name network-id -exec sh -c 'diff network-id "$1" > /dev/null 2>&1 && echo "$1"' _ {} \;

./875655a8f85f7dce8fcdca1fb94aa6bd19355a3b7c306445ba30ba15568a89ce/network-id