Skip to content
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

feat(sns): Enable upgrading SNS-controlled canisters using chunked WASMs #3287

Merged

Conversation

aterga
Copy link
Member

@aterga aterga commented Dec 23, 2024

This PR extends the existing proposal type UpgradeSnsControllerCanister with a new field chunked_canister_wasm that can be used for specifying an upgrade to a large WASM module (over 2 MiB) priorly uploaded to some store canister.

Example proposal render for chunked Wasm:

# Proposal to Upgrade an SNS Controlled Canister

## Target canister: xbgkv-fyaaa-aaaaa-aaava-cai

## Wasm info

Remote module stored on canister zyo6l-paaaa-aaaaa-aabxq-cai with SHA256 `010203`. Split into 3 chunks:
  - `010101`
  - `020202`
  - `030303`

## Mode: Upgrade

## Argument info

No upgrade argument.

Example proposal render for embedded Wasm:

# Proposal to upgrade SNS controlled canister:

## Target canister id: xbgkv-fyaaa-aaaaa-aaava-cai

## Wasm info

Embedded module with 8 bytes and SHA256 `93a44bbb96c751218e4c00d479e4c14358122a389acca16205b1e4d0dc5f9476`.

## Mode: Upgrade

## Argument info

Upgrade argument with 8 bytes and SHA256 `0a141e28323c4650`.

@github-actions github-actions bot added the feat label Dec 23, 2024
@aterga aterga force-pushed the arshavir/upgrade-sns-controlled-canister-with-chunked-wasm branch from 534ea16 to 49f5888 Compare January 8, 2025 21:12
@aterga aterga changed the title feat(sns): Large WASM support for SNS-controlled canisters feat(sns): Enable upgrading SNS-controlled canisters using chunked WASMs Jan 9, 2025
@aterga aterga marked this pull request as ready for review January 9, 2025 22:45
@aterga aterga requested a review from a team as a code owner January 9, 2025 22:45
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this pull request affects the behavior of any canister owned by
the Governance team, remember to update the corresponding
unreleased_changes.md file(s).

To acknowldge this reminder (and unblock the PR), dismiss this
code review by going to the bottom of the pull request page, and
supply one of the following reasons:

  1. Done.

  2. No canister behavior changes.

@aterga
Copy link
Member Author

aterga commented Jan 10, 2025

TODO: Extend the rs/nervous_system/integration_tests/tests/upgrade_sns_controlled_canister_with_large_wasm.rs test to submit a proposal that would tirgger the upgrade.

Done

@daniel-wong-dfinity-org
Copy link
Contributor

I think you need to modify the second example in your PR description? It lists chunks, but IIUC, the idea is that "embedded Wasm" means that there are no chunks.

@daniel-wong-dfinity-org daniel-wong-dfinity-org dismissed github-actions[bot]’s stale review January 10, 2025 12:12

changelog files have not been added for SNS yet, but that will happen very soon. If that goes in before this, then, yes, let's update those. Otherwise, this shouldn't be a blocker.

Copy link
Contributor

@max-dfinity max-dfinity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but with changes requested from our conversation.

@aterga aterga enabled auto-merge January 15, 2025 19:19
@aterga aterga disabled auto-merge January 15, 2025 20:11
@aterga aterga enabled auto-merge January 16, 2025 13:21
@aterga aterga added this pull request to the merge queue Jan 16, 2025
Merged via the queue into master with commit d9459d5 Jan 16, 2025
25 checks passed
@aterga aterga deleted the arshavir/upgrade-sns-controlled-canister-with-chunked-wasm branch January 16, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants