Skip to content

EVM on WASM: Improve account storage performance

Thomas Pecseli requested to merge thomas.pecseli@evm.storage.performance into master

Context

Current owner: @rodibozman (just rebased the work done by Thomas P. and added a few tweaks/refactorisation)

@thomas.pecseli:

A long time ago, when the account storage module was first written, we had to do a call to store_has before doing reads from a location to avoid some errors. Now, the store_read does this check for us and returns a Err(RuntimeError::PathNotFound) if there is nothing to read. Therefore we end up doing to host calls to store_has. This MR should improve performance and bring us up to date with the kernel runtime.

Also, there was a bug in how the kernel checked for contract code existence.

Manually testing the MR

Use the CI/unit tests as usual.

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 Rodi-Can Bozman

Merge request reports