Skip to content

feat: let the engine controller update subnets via update_subnet#10434

Draft
pietrodimarco-dfinity wants to merge 2 commits into
pdm/registry-halt-subnetfrom
pdm/engine-controller-halt-engine
Draft

feat: let the engine controller update subnets via update_subnet#10434
pietrodimarco-dfinity wants to merge 2 commits into
pdm/registry-halt-subnetfrom
pdm/engine-controller-halt-engine

Conversation

@pietrodimarco-dfinity

@pietrodimarco-dfinity pietrodimarco-dfinity commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What

Replace the halt-specific halt_engine method with a general update_engine(UpdateSubnetPayload) method on the engine controller canister. It forwards the full payload straight to the registry's update_subnet, so the single authorized caller can update any field of an engine subnet (e.g. toggle is_halted to halt/resume it) instead of just a hardcoded flag.

Details

  • update_engine is a thin pass-through to registry.update_subnet, restricted to the single authorized caller.
  • Re-exports UpdateSubnetPayload so clients can build the payload without depending on registry-canister directly.
  • Adds the candid declaration of UpdateSubnetPayload (and all transitively-referenced types) to engine_controller.did, kept in sync with the exported service.

Stacking

Stacked on #10433 (registry update_subnet auth relaxation, which makes the engine controller an authorized caller). Kept as a draft until #10433 merges.

Testing

PocketIC integration test halts then resumes a freshly-created engine subnet (asserting SubnetRecord.is_halted flips) plus an auth-rejection test, and the candid service_equal test. Both engine_controller_canister_test and engine_controller_integration_test pass locally.

@github-actions github-actions Bot added the feat label Jun 10, 2026
@pietrodimarco-dfinity pietrodimarco-dfinity force-pushed the pdm/engine-controller-halt-engine branch 2 times, most recently from b2e8bd4 to 2263047 Compare June 10, 2026 18:58
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title feat: halt an engine subnet from the engine controller feat: halt an engine subnet via the registry's update_subnet Jun 10, 2026
Add an `update_engine` method to the engine controller canister that
forwards a full `UpdateSubnetPayload` to the registry's `update_subnet`
(which the engine controller is now an authorized caller of), restricted
to the single authorized caller. This lets it update any field of the
subnets it manages, e.g. toggling `is_halted` to halt/resume an engine.

Adds the candid declaration, re-exports `UpdateSubnetPayload`, and a
PocketIC integration test that halts then resumes a created engine subnet
(asserting `SubnetRecord.is_halted` flips) plus an auth-rejection test.
@pietrodimarco-dfinity pietrodimarco-dfinity force-pushed the pdm/engine-controller-halt-engine branch from 7985705 to 8d36c9e Compare June 10, 2026 19:12
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title feat: halt an engine subnet via the registry's update_subnet feat: let the engine controller update subnets via update_subnet Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant