WASM PVM: Unlock WASM stack size for V1
Context
- Depends on !8374 (merged) to be sure we don’t break anything
Based on the regression test, where we construct a stack counting up to 100,000 frames. In practice, it looks like this does not hurt the size of the proofs. Behold!
The limit 60_000 has been chosen such that the simplest WASM program consisting in trying to recursively call 60,000 times the same function results in Wasmer raising a runtime error.
(module (memory 1) (export "mem" (memory 0)) (func $aux (param $n i32) (i32.ne (local.get $n) (i32.const 0)) (if (then (call $aux (i32.sub (local.get $n) (i32.const 1)))))) (func (export "kernel_run") (call $aux (i32.const 66_000))))
As a result, the key idea is that any program executing with Wasmer without an error could be executing by the WASM PVM.
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Thomas Letan