EVM on WASM: enable 1024 recursion depth on contract calls
Context
Ethereum allows for 1024 call depth of contract calls (ie contracts calling contracts). Each such call is reflected with at least one layer for function calls with the way we currently use SputnikVM. The WASM PVM allows for a maximum of ~300 in call depth.
To do
Rewrite the Ethereum contract call so we stay within the limits of the WASM PVM call stack size. One idea:
- Use
Trap
to return whenever we encounter a contract call. - When we encounter such traps we escape to some sort of top level, where we keep track of the actual Ethereum call stack (in stead of embedding the Ethereum call stack in the WASM stack).
(Just an idea)