[ethereum/go-ethereum] WIP: eWASM support (#16957)

axic commented on this pull request.

> + module, err := wasm.ReadModule(bytes.NewReader(contract.Code), WrappedModuleResolver(in))
+ if err != nil {
+ return nil, fmt.Errorf(«Error decoding module at address %s: %v», contract.Address(), err)
+ }
+ vm, err := exec.NewVM(module)
+ if err != nil {
+ return nil, fmt.Errorf(«could not create the vm: %v», err)
+ }
+ vm.RecoverPanic = true
+ in.vm = vm
+
+ var ret []byte
+
+ // If the module doesn’t have any start function, check if the
+ // exports specify a `main` function and if so, execute it.
+ if module.Start == nil {

So is `exec.NewVM` executing the start function?

Since this is disabled in ewasm, you could just leave out the if (perhaps replace it with a panic).

In any case you need to add support for executing system contracts, at least in the create case, so that incoming bytecode can be run through metering.