EVM/Proxy: allow batching requests
Context
Some EVM Clients (Geth for example) support receiving multiple requests at once. Batch are described in the JSON-RPC specification. The order of responses are not specified, but I chose to set it to the same order than the requests.
These are actually necessary for indexers that use these extensively to fetch blocks and transactions.
Manually testing the MR
I've added two tests:
- one that checks a single request or a batch of one request are equivalent
- one that batch two requests and check the results are consistent
dune exec tezt/tests/main.exe -- --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.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