[go: up one dir, main page]

EVM: proxy calls rollup node simulation for eth_call

Context

Contributes to #5688 (closed)

We have a simulation mode in the kernel, and we can send messages to be simulated on to the rollup node. This is the proxy part: The proxy receives a eth_call request, translates it in a set of messages for the kernel, and calls the simulation, then returns the result of the simulation to the initial caller.

This entails:

  • encoding a simulation input in RLP form
  • chunk it if necessary
  • send messages to rollup node
  • parse the result
  • forward the result

Commits try to be more or less self contained and to introduce the code in +- logical steps.

Limit of current implementation: the kernel is not able to execute if no gas is given, even in simulation mode. A minimal value is added by the proxynode if none is given in the original eth_call input. cf #5863 (closed) and !9108 (merged)

Manually testing the MR

dune exec tezt/tests/main.exe -- simulate --file evm_rollup.ml

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 Pierre-Emmanuel CORNILLEAU

Merge request reports

Loading