Is it directly inside the contract.wasm binary, in the spirit of linear memory?
- Orkun Külçe @orkunkl2020-07-27 10:00:32.023Z
Stack size limit is determined by the host (i.e. Wasmer+singlepass). See this spec discussion as well: https://github.com/WebAssembly/design/issues/1163. I’m not aware if and which stack size limit is in place. Feel free to attack this and let us know your findings.
Linear memory is the implementation for heap storage, so this has nothing to do with the stack.
- In reply toorkunkl⬆:Orkun Külçe @orkunkl2020-07-27 10:00:40.476Z
Ah I see -- so is there limited heap memory for each wasm code uploaded that is bound by the size of the binary?
- In reply toorkunkl⬆:Orkun Külçe @orkunkl2020-07-27 10:00:59.071Z
Right now there is one linear memory for each instance that is bound by the 32 bit address space in the Wasm sandbox (4GB)
A contract can allocate those 4GB but due to gas limit cannot write so much data. In practice I was not able to trigger a high memory usage on the host