You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 955833d
Browse filesBrowse the repository at this point in the historyBrowse files
refactor: adopt ic-utils with_canister_settings in create_mgmt (#661)
* refactor: adopt ic-utils with_canister_settings in create_mgmt
Bump the agent-rs crates (ic-agent, ic-utils, ic-identity-hsm) to 0.49.1
and ic-management-canister-types to 0.8.0 so create_mgmt can use the new
CreateCanisterBuilder API from dfinity/agent-rs#737.
create_mgmt now builds the call via
ManagementCanister::create_canister().with_canister_settings(...), and
routes to the target subnet with with_effective_subnet_id(subnet) instead
of resolving a canister id from the subnet's ranges. This drops the manual
Encode!/update/Decode! dance and the canister-range lookup; the function
now takes the subnet Principal directly. Validated end-to-end by the
canister_create_cloud_engine integration test.
Also handle the breaking changes the bump introduces:
- CanisterSettings/DefiniteCanisterSettings gained snapshot_visibility;
add it to the two exhaustive settings literals (left None with a TODO to
make it configurable like log_visibility in a follow-up PR).
- ic_agent::identity::Delegation gained permissions; add permissions: None
to the three literal constructions.
- ManagementCanister::canister_status now returns QueryOrUpdateCall; use
.call() in the canister top-up test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: explain why imported delegations use permissions: None
The wire DelegationChain from the cli-backend canister has no permissions
field and the CLI only ever signs unrestricted delegations, so every
delegation reconstructed here was signed with permissions absent. Because
the field is skip_serializing_if'd out of the signable hash when None,
reproducing it as None yields the exact signed bytes and the chain still
verifies in DelegatedIdentity::new. Documents this to preempt the concern
that None drops a signed field.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments