ref-fvm
ref-fvm copied to clipboard
"life before invoke" in wasm code
Currently, code can run before invoke, but it'll run out of gas immediately and trap (leading to a fatal error).
We need to either:
- Properly account for this kind of code.
- Forbid it.
Ideally, we'd just forbid it. It looks like we can run wasm-ctor-eval (from binaryen)?
@Stebalien Is this talking specifically about Wasm module start functions? What other bytecode can exist before invoke in our case?
- The start function.
- Table initialization functions. See the
exprs that appear in https://webassembly.github.io/spec/core/syntax/modules.html#syntax-elem.
I'm centralizing all wasm validation in https://github.com/filecoin-project/ref-fvm/issues/1038.