Scoru: preparatory steps for in-memory durable replacement
Context
Necessary for !7934 (closed)
The problem this MR tackles: we need to conform current durable implementation for some methods (hash, list, subtree_at). The way to do so is to encode durable in-memory back to irmin tree and invoke corresponding functions in irmin tree. But with the current state of the code it's problematic.
This MR makes two preparatory steps for in-memory durable replacement:
-
Encodings_util has been moved to
lib_tree_encodingand abstracted overTezos_context_sigs(though, quite clumsy becauseTEZOS_CONTEXT_MEMORYdoesn't satisfy originalTEZOS_CONTEXT).
This one is needed in case if underlyinglazy_maporigin (which is used bylazy_fsin in-memory durable) isNone(that is the case for several tests not for real run) -
Make
Lazy_map.originto be wrapped_tree explicitly.
This one is needed to make encoding in case iforiginisSometo make encoding more explicit and type-safe (in order to carry the corresponding Tree module along with the origin tree itself).
You can see usage of both of the changes in this place in the follow-up MR !7934 (030da862)
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.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