Ledger Wasm Too Big

The current Dfinity Ledger wasm is too large, even after minimisation, to be deployed to the IC for testing purposes. Does anyone have a version of the ledger wasm that is under the 2mb limit? After optimising, I am seeing a file-size of roughly 2.5 mb.

Cheers

3 Likes

Hi @Maxfinity !

We optimized the size of the Ledger canister in scope of the “Ledger canister fit for dapps” feature (The Internet Computer’s Post-Genesis R&D Roadmap | by DFINITY | The Internet Computer Review | Feb, 2022 | Medium). The Wasm module should now be below 2MiB (this commit did the trick if you’re curious).

Could you please try following the local setup instructions but use a fresh commit from the IC repo in the first step (e.g., export IC_VERSION=c7ec4881cf8db619aab86a148010b74f58e3ef37)?

4 Likes

Hello Max,

For canister wasm larger than 2mb (egress message size limit) and smaller than 5mb (intra canister message limit tbc) –
You might be able to deploy the canister via a canister;

Here is an example (not really well documented) about how to achieve this: GitHub - ORIGYN-SA/large_canister_deployer_internal: Install wasm code to a canister larger than 2 mb by chunking it and deploying it via a canister in the same subnet
large_canister_deployer_internal/index.js at master · ORIGYN-SA/large_canister_deployer_internal · GitHub

Make sure that the “larger canister deployer” canister and the target canister are in the same subnet;

5 Likes

Hi Roman, none of these commits work unfortunately - the first is unfortunately slightly too large and the second has an invalid gz format.

The data I see is a bit different, did i miss something?

Hi @Maxfinity!

none of these commits work unfortunately - the first is unfortunately slightly too large and the second has an invalid gz format.

I looked into that issue, it turns out that there was recently a refactoring in the CI pipeline that introduced a glitch making the canister larger again.

You can use this commit hash to get a reasonably small ledger canister: 77cecc596216a584174106733b40513645641fef

Thanks for reporting the issue and sorry for the inconvenience.

2 Likes