Closed axic closed 5 years ago
Having a look at wagon, it seems to do the job but it panics if it encounters a fault. This is a problem if we are going to use it to run contracts, because we can't have geth panic if some contract code is broken.
I have submitted this PR https://github.com/go-interpreter/wagon/pull/53
This gist shows a unit test that demonstrates how to create a module that offers native functions. So far, that requires making some changes to the wagon
code. I will clean up the code and create a PR this week, to get some feedback from the wagon team.
Regarding the panic
, the wagon team requested a different approach that is tracked in https://github.com/go-interpreter/wagon/pull/57
Great news!
https://github.com/go-interpreter/wagon/pull/58 is the cleaned-up PR asking the wagon people for their comments. I still need to make sure that functions with parameters can be properly called, and then I can start implementing the EEI methods.
both PRs are now integrated, I can now proceed with the EEI
@gballet update from today: Working on EEI, done with the easy part. Looking into contracts calling other contracts.
Looks like this was missing a reference to the PR that integrates wagon into geth: https://github.com/ethereum/go-ethereum/pull/16957
Closing this now.
Apparently native ewasm support in geth could be implemented by using wagon (a wasm interpreter written in Go).
@gballet volunteered to look into this
The tasks are:
For an inspiration see https://github.com/ewasm/hera which does the same thing using binaryen.