@roman-kashitsyn I’m working on Kybra, a Python CDK, and unfortunately I just ran into the Wasm binary size limit again, even with gzip. When I include the stdlib for Python using the RustPython VM, the binary after optimization and gzipping is ~10mb and it gets rejected. I hope I can get around this by optimizing somehow, but here I am reaching the limit again as I’m trying to implement the same tech we have on Web2.
I believe the next step will be implementing a chunking protocol for the canister module installation. I created an IC feature for that in May, but there has been a lot of more urgent stuff on the execution’s team plate (DTS & scheduling, firefighting & squeezing perf, bitcoin integration, etc.).
I have being using ss uploader:
It creates chunks of the wasm module, works very well!
You’re able to initialize a canister with this? How large can the Wasm binary be? My understanding is that there’s still a ~10mb limit if you chunk the Wasm, is this true?
Is there a public ticket/issue that we can follow? And FYI if the limit can be increased significantly it would unlock a major blocker for Kybra, which is allowing the inclusion of the entire Python stdlib: stdlib · Issue #12 · demergent-labs/kybra · GitHub
@roman-kashitsyn Is it true that there is a 10mb limit on cross-canister messages? Could you then install a canister with a Wasm binary up to 10mb in size if you first chunked the Wasm binary into a canister, and used that canister to call install on the management canister?
I thought I read this somewhere in the past, but I’m having a hard time finding that information.
Currently, the inter-canister message limit within a single subnet is 10 MiB, while the limit on messages between subnets is 2 MiB.
This setup is very problematic because it breaks the transparency of XNet communication. Generally, canisters should not care about the destination’s subnet when they make the call, except for this difference in max message size. This difference also blocks subnets splitting work: separating canisters can break people’s code because they might be sending large payloads, and separating them will break the code.
I’m having a hard time finding that information.
Yes, the size difference is not documented anywhere, mainly because it’s a horrible hack that we don’t want people to use. I’m not sure why we raised the limit for inter-canister messages in the first place, my hunch is that someone really wanted to install a large canister
Sory for the late message. The code I have mentioned create chunks so you can upload a large wasm file.