Etherlink+DAL: fix encoding of slot index 0
What
This MR fixes a bug in the RLP encoding of DAL slot import signals in the sequencer.
Why
The bug was that the slot index 0 was badly encoded. Because of this, the Etherlink kernel failed to parse any signal for slot index 0, so the slots on this index were never imported.
How
- Use
Rlp.encode_intinstead of the buggyHelpers.encode_u8 - Remove now unused
Helpers.encode_u8to prevent the bug from reappearing.
Manually testing the MR
Compile master:
$ git checkout master
$ make
Check that the second Etherlink+DAL test from this MR fails:
$ git checkout rafoo@dal_etherlink_index_0
$ dune exec etherlink/tezt/tests/main.exe -- --file etherlink/tezt/tests/dal_sequencer.ml alpha --skip 1 --only 1
Recompile, with the bug fix:
$ make
The test should now succeed:
$ dune exec etherlink/tezt/tests/main.exe -- --file etherlink/tezt/tests/dal_sequencer.ml alpha --skip 1 --only 1
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