Proto environment: Upstream the new compact encoding from lib_protocol to lib_base
Context
During work on TORU, @lthms made a custom hyper-compact encoding for some operations. See !4275 (merged). With barely any nudging, he then generalised the compact encodings so that he could express his hyper compact encoding via some generic combinators.
This MR, by @thomas.athorne , moves the compact encoding implementation from the protocol (where it used to live in !4275 (merged)) and moves it into lib_base. It gets added to the V5 environment.
The main idea of this MR is to make the compact encoding part of the environment rather than the protocol. The long-term goal is to move the code into the data-encoding library. This MR is a stop-gap to
- allow the work on TORU (and apparently SCORU which will use the encodings too) to continue without having to wait for a release of data-encoding with the new feature, and
- prepare for the eventual integration into data-encoding: it already exposes
Compact
as a submodule which should make upgrade to the future data-encoding relatively easy.
When you review the MR:
Keep in mind that this is not the full-feature Compact module. The final module will be extended and might even be changed somewhat. All the changes will lead to environment changes (if the release of data-encoding happens prior to the release of envv5) or the introduction of a compatibility layer in envv5.
Do critique the interface and the implementation, but also do understand that some of your comments will put aside until the module is moved to data-encoding proper.
Manually testing the MR
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