So, accordingly to rumors, WASM64 will be introduced soon and heap memory will grow to 400GB (or more).
Some things are unclear:
Canisters with big heap memory would not be upgradeable because of a big number of cycles required to upgrade it. How is this problem solved? Please, give a detailed answer.
How to upgrade an existing (WASM32) canister to WASM64?
Wasm64 is indeed progressing and we are closing in on a beta release. However, please note that a 400 GB wasm memory heap is not possible any time soon. The near-future scenario is going to be along the following lines: (1) an initial Wasm64 beta release with a heap of (still) 4 GB; (2) An official release with 6 GB heaps; (3) If all goes well, 8 GB heaps at a later stage.
To answer your questions:
(1) I think the above answers your question, there will not be huge wasm heaps;
(2) Developers will have to recompile their canisters in Wasm64 mode and re-deploy.
We have an active investigation on what is a realistic heap size target for the future. Unfortunately, there are technical challenges that need to be overcome before a certain size can be agreed upon.
Wrt upgrade: A large heap doesn’t mean one should be able to fully copy and restore. There are 2 solutions currently: (1) The upcoming motoko enhanced orthogonal persistence or (2) simply using stable structures.