[go: up one dir, main page]

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_int instead of the buggy Helpers.encode_u8
  • Remove now unused Helpers.encode_u8 to 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.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

Merge request reports

Loading