EVM on WASM: Clean up error types in EVM execution
Context
Previously, there was some ambiguity to the meaning of the EthereumError type. It could mean something wrong with the contract or transaction (eg not enough gas, execution errors, invalid instructions). It could also wrap errors from the kernel runtime (storage errors, general API errors, et.c.). With this MR this has been cleaned up, so that EthereumError only indicates something wrong with the kernel or runtime - ie very critical errors that indicate the state of the kernel may be broken in some way, eg, errors from durable storage when committing a transaction. Normal execution errors are indicated with normal execution outcome and sputnik exit reasons where applicable.
Manually testing the MR
Run cargo make test from the src/kernel_evm as usual. The unit tests run as part of normal CI pipelines.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR