Skip to content

Improve quality of Pages_encoding module

Martin Tomazic requested to merge martin@refactor_pages_encoding_1 into master

Context

As discussed in private we are going to pass on the idea of having separate Pages_encoding_sigs.ml and Pages_encoding_functors.ml/i files (see the thread). For this reason this MR has been rebased and it's scope has changed.

As such this MR does the following:

  • It improves existing docstring inside Pages_encoding and formats it correctly. (see the first two commits).
  • It explains/further documents existing versioning.
  • It improves existing error reporting as requested by @gsebil08.

Finally I have opened a series of issues that this MR has encountered and I plan to tackle them as a follow-up.

Old context:

This MR try to improve organisation and code quality of Pages_encoding module by:

  1. Aligning the code organisation with what's done for the storage in the protocol and in the layer2 utils:
  2. Additionally before refactoring it improves existing docstring inside Pages_encoding and formats it correctly. (see the first two commits) Special note to reviewers: This MR improves documentation and moves (copy paste) logic into different file organisation. Ideally, renamings and other code improvements should be done as a separate follow-up/are out of scope of this MR.

Potential further improvements:

See the comment: !8164 (comment 1324422938)

Manually testing the MR

CLI should pass. More specifically you can try running the following commands relevant for the DAC:

dune exec src/proto_alpha/lib_dac_plugin/test/main.exe -- --info
dune exec tezt/tests/main.exe -- --file dac.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.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
Edited by Martin Tomazic

Merge request reports