Tezlink/Kernel: Deposit receipt for Tezlink
Linear issue
Closes L2-593
What
Push to the list of applied operation the operation representing the deposit
Why
Currently you can deposit tez to a Tezlink kernel, but you would get 0 feedback on your deposit. It will not appear in the block.
How
We chose to represent a deposit of x tz as a transfer of x tz from address zero to receiver.
For that we change the return of execute_tezlink_deposit to return a TransferContent and a TransferResult.
With those two informations we can build a receipt for a deposit.
Manually testing the MR
You can't test this MR with the tezt_cloud scenario as you need a full rollup setup to do a deposit.
To test the feature in a hackkish way you can put a sleep at the end of test_delayed_deposit_is_included tezt test in etherlink/tezt/tests/tezlink.ml
Then start the test:
dune exec etherlink/tezt/tests/main.exe -- --verbose tezlink deposit > ~/tezt.log&
The tezt tests will do a deposit of 1000 tez for tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx.
You should be able to retrieve the endpoint with a grep on the log:
grep "get balance" ~/tezt.log
[15:35:11.501] [client1] ./octez-client --endpoint http://127.0.0.1:45167/tezlink --base-dir /tmp/tezt-93320/1/client1 get balance for bootstrap1
[15:35:18.301] [client1] ./octez-client --endpoint http://127.0.0.1:45167/tezlink --base-dir /tmp/tezt-93320/1/client1 get balance for bootstrap1
Then you can check the block to find the receipt of the deposit (it should be in block 2)
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