[go: up one dir, main page]

EVM on WASM: Refactor error- and transaction- handling

Context

This MR refactors transaction- and error- handling in the EVM execution crate. The changes achieve:

  • A simplification of how execution results lead to different transaction outcomes, ie, rollback or commit.
  • A differentiation between intermediate and initial transaction. The intermediate transactions lead to outcome that is consumed by parent transactions, while the outcome of the initial transaction is consumed for the purpose of generating a receipt. Those are very different things.
  • Preparation for implementing instructions that depend on data associated with the transaction stack: STATICCALL, SUICIDE (contract deletion), GAS- related instructions, and LOG instructions.
  • Check that at the end of execution we really do end the initial transaction, ie, the number of transactions begun matches the number of commits/rollbacks.

Manually testing the MR

Use

cargo make test

from src/kernel_evm.

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.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Thomas Pecseli

Merge request reports

Loading