Skip to content

Add trees to the env v2

The MR adds trees (aka "directories" aka "cursors" to the protocol.

Depends on:

I've tried to split the commit into steps which compile and pass the unit-tests and so sometimes the changes have to cross the components. I hope it is ok but I am happy to do differently if needed.

The changes touches 3 components:

  • the protocol environment
  • the environment v2
  • the alpha protocol

For each of these components I've tried to split the changes into 3 steps:

  • extracting the context module type in an _intf.ml to avoid code dupliction
  • renaming the existing functions into more "functional" names (e.g. add instead of set, find instead of get if the result is an option type)
  • adding new tree functions and a new Tree module to manipulate the context Merkle tree and a more expressive fold function.

Side-effect: fixes #1043 (closed), as it makes Proxy_context use the same backend as Memory_context.

Edited by Raphaël Proust

Merge request reports

Loading