[go: up one dir, main page]

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_encoding and abstracted over Tezos_context_sigs (though, quite clumsy because TEZOS_CONTEXT_MEMORY doesn't satisfy original TEZOS_CONTEXT).
    This one is needed in case if underlying lazy_map origin (which is used by lazy_fs in in-memory durable) is None (that is the case for several tests not for real run)

  • Make Lazy_map.origin to be wrapped_tree explicitly.
    This one is needed to make encoding in case if origin is Some to 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.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 Ilya Peresadin

Merge request reports

Loading