Improve the context API
This MR improves the lib_storage/context.ml API, to get closer to the Irmin API.
Depends on:
- !2510 (merged) (Irmin 2.3 release)
- !2461 (merged) (refactor lib-storage signatures)
This MR introduces a new context API, initially only for the shell but the next MRs will push this API through the protocol.
The main changes are:
-
Context.foldis now recursive ; - a
Context.Treemodules which is almost a subset of the corresponding Irmin.Tree API. - the
copyfunction has been removed as using trees directly is more efficient. - A pagination-friendly
Context.listfunction has been added. - A way to expose context subtrees to raw, in-memory subtrees has been added (and the relevant data-encoding). This is useful for the proxy code (see !2466 (merged))
Edited by Thomas Gazagnaire