EVM: add event logs for native token deposits
What
This MR refactors native token (tez) deposits and make them emit event logs during application.
Why
Currently there is no non-ambiguous way to match transactions on L1/L2 that correspond to the tez deposit.
How
There are two modifications introduced:
- Tez deposits now also carry inbox level and message ID;
- If tez deposit is successfully applied an event log is emitted, which contains deposit amount, receiver, and inbox info.
Manually testing the MR
In kernel_evm folder:
make test
In tezos/tezos root:
make -f etherlink.mk EVM_KERNEL_FEATURES=debug evm_kernel.wasm
dune exec etherlink/tezt/tests/main.exe -- -f evm_sequencer.ml alpha latest deposit -i
dune exec etherlink/tezt/tests/main.exe -- -f evm_sequencer.ml alpha latest legacy -i
dune exec etherlink/tezt/tests/main.exe -- -f evm_rollup.ml alpha latest deposit -i
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
Edited by Michael Zaikin