ewasm / hera

Hera: Ewasm virtual machine conforming to the EVMC API
Apache License 2.0
179 stars 50 forks source link

better error message when contract imports unimplemented host functions #538

Open cdetrio opened 5 years ago

cdetrio commented 5 years ago

When trying to import an unimplemented host function using wabt, the only error message is:

geth_evmc_test.go:143: evmc: contract validation failure
axic commented 5 years ago

Checked wabt and I'm not sure it is easy to do this :(

However we could extend chisel to display unknown/invalid symbols.

aarlt commented 5 years ago

hmm.. i only looked briefly in the evmc interface, so probably im wrong.. but is there any concept of returning "error messages" (in contrast to simple return codes) back from an evmc implementation? i was also not able to find geth_evmc_test.go, so i dont know the full context of this issue..

axic commented 5 years ago

but is there any concept of returning "error messages" (in contrast to simple return codes) back from an evmc implementation?

Yes, but problem we had here is getting specific messages from wabt in the first place.

Hopefully #540 improved it.