-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: effective target canister ID for mgmt call (#773)
# Motivation Using the IC mgmt function `install_chunked_code` currently fails when executed against mainnet. ``` e: Server returned an error: Code: 400 (Bad Request) Body: error: canister_not_found details: The specified canister does not exist. ``` The feature works locally but, fails on mainnet or the call is being rejected by the BN because it does not comply with the specification. > The <effective_canister_id> in the URL paths of requests is the effective destination of the request. It must be contained in the canister ranges of a subnet, otherwise the corresponding HTTP request is rejected. > If the request is an update call to the Management Canister (aaaaa-aa), then: > > If the call is to the install_chunked_code method and the arg is a Candid-encoded record with a target_canister field of type principal, then the effective canister id must be that principal. Source: https://internetcomputer.org/docs/current/references/ic-interface-spec/#http-effective-canister-id # Changes - If the `tranform` function is called for method `install_chunked_code` with `target_canister`, then `effectiveCanisterId` is the `target_canister` else same as before. --------- Signed-off-by: David Dal Busco <david.dalbusco@dfinity.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
230ebe2
commit 98d0d33
Showing
3 changed files
with
145 additions
and
51 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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