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

Re-enable upgrading SNS-controlled dapp after launch #83

Open
aterga opened this issue Dec 4, 2024 · 2 comments
Open

Re-enable upgrading SNS-controlled dapp after launch #83

aterga opened this issue Dec 4, 2024 · 2 comments

Comments

@aterga
Copy link
Member

aterga commented Dec 4, 2024

We need to disable the steps in the run_basic_scenario.sh in which the dapp under a launched SNS control is upgraded via proposal. The issue manifests itself with the following symptoms:

I have a recent version of SNS Governance (9f168dd6e0461e454627ad5705c91fd1f2a63549 from Nov 25) for which I can submit proposals as follows:

dfx canister call br5f7-7uaaa-aaaaa-qaaca-cai manage_neuron '(
  record {
    subaccount = blob "\60\3c\05\bd\e1\5f\c8\94\ba\30\af\fd\f3\5a\0a\d9\da\cb\10\32\e2\2d\04\23\c8\0c\f7\1c\fe\21\4b\be";
    command = opt variant {
      MakeProposal = record {
        url = "https://forum.dfinity.org/";
        title = "Hello";
        action = opt variant {
          Motion = record { motion_text = "hello, world!" }
        };
        summary = "World";
      }
    };
  },
)'

(this works)

But if I try to submit an UpgradeSnsControlledCanister proposal, I get the following error:
The replica returned a rejection error: reject code CanisterError, reject message
Error from Canister br5f7-7uaaa-aaaaa-qaaca-cai:  — this is my SNS Governance
Canister violated contract: ic0.msg_reply_data_append: application payload size (3043594) cannot be larger than 2097152.. Consider checking the response size and returning an error if it is too long.
See documentation: http://internetcomputer.org/docs/current/references/execution-errors#msg_reply_data_append-payload-too-large, error code None

Note that the response type GetProposalResponse is a bounded structure, so it’s can’t be that.

@iamyunsin
Copy link

iamyunsin commented Feb 5, 2025

@aterga I also encountered this error, how can I solve it?

@aterga
Copy link
Member Author

aterga commented Feb 5, 2025

@iamyunsin

Upgrading SNS-controlled canisters can now be done using a single command, but first you need the DFX-SNS extension:

dfx extension install sns  
Extension 'sns' version 0.5.0 installed successfully

and then you can run

dfx sns upgrade-sns-controlled-canister \
    --sns-neuron-id <sns_neuron_id> \
    --target-canister-id <target_canister_id> \
    --wasm-path <wasm_path> \
    --candid-arg <candid_arg>

which will submit the upgrade proposal.

Note that this command works even if the Wasm size is very large.

In sns-testing, you can then vote that proposal through by using the vote_on_sns_proposal.sh script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants