Repository navigation
feat(engine-controller): Let the engine controller create canisters on cloud engines - #11924
Merged
pietrodimarco-dfinity merged 3 commits intoOct 23, 2026
Merged
Conversation
…n cloud engines
Adds `create_canister { subnet_id; controllers }`, which creates an empty
canister on a cloud engine subnet, controlled by `controllers` only.
Only a canister on the NNS subnet may create a canister on another subnet,
so the authorized caller, which is not on the NNS, cannot put a canister on
an engine it created. The engine controller creates it instead, addressing
the engine's subnet directly. The target must be a `CloudEngine` subnet in
the registry; the call is bounded-wait and carries no cycles, as every call
into a cloud engine must.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The privileged cross-subnet creation path warrants human confirmation, and its integration tests were not executed.
No open issues 🎉
What changed in this PR
Adds an authorized create_canister endpoint to the NNS-hosted engine controller, allowing its caller to create empty canisters on cloud engine subnets.
Changes:
- Validates authorization, controller count, and registry subnet type before making a bounded-wait, zero-cycle creation call.
- Adds public Rust and Candid types, dependency wiring, and a changelog entry.
- Adds four PocketIC tests covering successful creation and rejection of invalid or unauthorized requests.
| File | Description |
|---|---|
rs/engine_controller/unreleased_changelog.md |
Documents the new creation endpoint. |
rs/engine_controller/tests/tests.rs |
Adds cloud engine setup and four integration tests. |
rs/engine_controller/src/lib.rs |
Defines creation request and response types. |
rs/engine_controller/engine_controller.did |
Exposes the additive Candid endpoint. |
rs/engine_controller/Cargo.toml |
Adds runtime dependencies for creation and registry access. |
rs/engine_controller/canister/canister.rs |
Implements validation and cross-subnet canister creation. |
rs/engine_controller/BUILD.bazel |
Wires dependencies into Bazel targets. |
Cargo.lock |
Records the added NNS common dependency. |
Review effort: Balanced
pietrodimarco-dfinity
enabled auto-merge
October 22, 2026 16:40
Contributor
Author
|
The four new |
r-birkner
reviewed
Oct 23, 2026
r-birkner
reviewed
Oct 23, 2026
r-birkner
reviewed
Oct 23, 2026
r-birkner
approved these changes
Oct 23, 2026
r-birkner
reviewed
Oct 23, 2026
Trims the method's doc comment and the changelog entry, and adds a test that more than 10 controllers are refused. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ers test Co-Authored-By: Claude Opus 5.5 <[email protected]>
pietrodimarco-dfinity
deleted the
pdm/engine-controller-create-canister
branch
October 23, 2026 09:45
eichhorl
added a commit
that referenced
this pull request
Oct 23, 2026
Resolve the Cargo.lock conflict with #11924, which added ic-nns-common next to the engine controller's ic-management-canister-types entry. Cargo.lock is master's with the bump re-applied by cargo, which adds only ic-management-canister-types 0.11.0 and switches the same 30 references. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dfinityianblenke
added a commit
that referenced
this pull request
Oct 27, 2026
dfinityianblenke
added a commit
that referenced
this pull request
Nov 2, 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.
Adds a
create_canistermethod to the engine controller. It creates an empty canister on a cloud engine subnet, controlled only by the controllers the caller passes in.Why. The authorized caller (the engine canister that creates and bills cloud engines) is not on the NNS subnet. Only a canister on the NNS subnet may create a canister on another subnet. Off the NNS,
create_canisteronaaaaa-aais routed to the caller's own subnet, and addressing another subnet's id directly is refused. So today the authorized caller cannot put a canister (for example the engine's operator canister) on an engine it created. An off-chain subnet admin has to create it by ingress instead. The engine controller is on the NNS, so it can do this for its caller.create_canister { subnet_id; controllers }returns{ canister_id }:controllersmust hold 1 to 10 principals, and they become the canister's only controllers. The engine controller is never a controller unless it is listed, so it holds nothing on the engine afterwards. The controllers install and configure the canister with ordinary management canister calls, which are routed by canister id and already work across subnets.CloudEnginesubnet in the registry. Any other subnet is refused before any call is made.SysUnknown), the canister may still have been created, controlled bycontrollers.The new method is additive and the interface stays backwards compatible. The changelog entry is in
unreleased_changelog.md.Tests. Five new PocketIC tests boot an NNS subnet and a real cloud engine subnet with the registry ICP feature:
🤖 Generated with Claude Code