refactor(scripts): use dfx --system-canisters instead of manual NNS setup#630
Merged
Conversation
… NNS setup Replace manual installation of system canisters (ICP ledger, ICP index, CMC, Internet Identity) with dfx 0.30.2's --system-canisters flag, which bootstraps them automatically via PocketIC at well-known NNS canister IDs. - Bump dfx from 0.25.0 to 0.30.2 - Remove ~110 lines of install/uninstall/setup functions from orbit script - Add setup_system_canisters_post() for ICP transfer and CMC subnet config - Update CI workflows to use --system-canisters - Remove Python/cbor2/crc32 CI dependencies (only needed for native replica) - Update README and getting-started docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dfx requires the wasm field for type: "custom" canister definitions, even when the canisters are bootstrapped by --system-canisters and won't be deployed via dfx. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dfx 0.30.2 adds JSDoc comments to generated TypeScript declaration files from candid documentation comments. No structural changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…k_list With --system-canisters, the CMC is configured with the real governance canister, so only it can call set_authorized_subnetwork_list. Use dfx's --sender flag to impersonate the governance canister (supported on PocketIC). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dfx 0.30.2 renamed --sender to --impersonate for canister call. Upgrade icx-asset from 0.21.0 to 0.29.0 for asset canister compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the local dev/CI bootstrapping flow to rely on dfx start --system-canisters (PocketIC-managed system canisters) instead of manually installing NNS/system canisters, and updates docs/CI accordingly.
Changes:
- Switch local startup commands to
dfx start --system-canistersin docs, scripts, and CI. - Simplify the
orbit --initflow by removing manual system-canister install logic and adding a small post-bootstrap helper (ICP transfer + CMC subnet authorization). - Bump
dfxversion and refresh generated Candid TS types / tool versions.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
orbit |
Removes manual NNS/system-canister setup and adds setup_system_canisters_post to finalize PocketIC --system-canisters bootstrap. |
dfx.json |
Drops the cmc canister entry and bumps dfx to 0.30.2. |
.github/workflows/tests.yaml |
Updates CI to start with --system-canisters and removes Python/cbor2/crc32 steps. |
README.md |
Updates local dev instructions to use dfx start --system-canisters. |
docs/src/content/docs/developers/getting-started.md |
Updates the dfx start command to --system-canisters. |
package.json |
Updates e2e deploy script to start dfx with --system-canisters. |
scripts/utils.sh |
Bumps icx-asset install version. |
apps/wallet/src/generated/**.did.d.ts |
Regenerated TS declarations with expanded JSDoc/comments. |
Comments suppressed due to low confidence (1)
docs/src/content/docs/developers/getting-started.md:69
- Step 4 says "Start the Internet Computer replica in the background", but the command shown does not use
--background, and--system-canistersstarts PocketIC rather than the native replica. Also, the subsequentdfx deploywill attempt to deploy all canisters indfx.json(includingicp_ledger/icp_index/internet_identity), which is likely not the intended local-dev flow now that system canisters are bootstrapped automatically. Consider updating this step to mention PocketIC and to usedfx start --background ...plus./orbit --init(as in the root README) instead ofdfx deploy.
## Step 4: Start the Local Development Server
1. Start the Internet Computer replica in the background:
```bash
dfx start --clean --system-canisters --host 127.0.0.1:4943
-
Deploy the canisters to the local replica:
dfx deploy
</details>
---
💡 <a href="/dfinity/orbit/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
63337c5 to
410d78d
Compare
The --system-canisters flag deploys a bundled II version whose UI differs from the release-2025-08-29 version the e2e tests expect. Re-deploy the project's pinned II after bootstrap so the captcha-based registration flow is available for e2e tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
410d78d to
d2bd528
Compare
…d frontend The upgrade mode preserves the stable memory and frontend assets from the system-bootstrapped II, which doesn't have the captcha-based registration UI that the e2e tests expect. Using reinstall does a clean install with the project's pinned II wasm. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use get_replica_url() instead of hardcoded localhost URL - Add retry loop and validation for topology fetch - Add --network local to all dfx calls to guard against non-local usage - Fix README wording: "local replica" → "PocketIC" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sea-snake
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code