-
Notifications
You must be signed in to change notification settings - Fork 23
fix: effective target canister ID for mgmt call #773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Signed-off-by: David Dal Busco <[email protected]>
Signed-off-by: David Dal Busco <[email protected]>
…' into fix/effective-target-canister-id
Signed-off-by: David Dal Busco <[email protected]>
This was referenced Nov 26, 2024
peterpeterparker
added a commit
that referenced
this pull request
Nov 27, 2024
# Motivation It’s literally impossible to test the internal `transform` function used within the static `create` function of the `ic-mgmt` class. However, as we need to address an issue to support WASM installation with chunks (#773), we must extend it. That’s why this PR extracts the function into a module, allowing us to provide tests for the mapping. # Notes We delegate the responsibility of calling the `transform` function to `agent-js`, as it is used internally there and as we are "just" implementing the interface exposed by agent-js. While it is not thoroughly covered at the moment in the agent, I submitted a PR [#954](dfinity/icp-js-core#954) today that adds at least one assertion. No particular entry in CHANGELOG. This is an internal refactoring. # Changes - Extract internal `transform` function to a utility. - JSdocs and tests. - Improve types of the function (expected interface and return type) --------- Signed-off-by: David Dal Busco <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: David Dal Busco <[email protected]>
Signed-off-by: David Dal Busco <[email protected]>
Contributor
size-limit report 📦
|
Signed-off-by: David Dal Busco <[email protected]>
AntonioVentilii
approved these changes
Nov 27, 2024
Collaborator
AntonioVentilii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM tks!
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.
Motivation
Using the IC mgmt function
install_chunked_codecurrently fails when executed against mainnet.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.
Source: https://internetcomputer.org/docs/current/references/ic-interface-spec/#http-effective-canister-id
Changes
tranformfunction is called for methodinstall_chunked_codewithtarget_canister, theneffectiveCanisterIdis thetarget_canisterelse same as before.