plebeia
Merkle Patricia tree implementation
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
2 Types
type hashed =
| Hashed of Hash.t | |
| Not_Hashed | (* Type used to prove that if a node is hashed then so are its children. The type also provides the hash as a witness. *) |
type indexed =
and view = private
| Internal of node * node * indexed * hashed |
| Bud of node option * indexed * hashed |
| Leaf of Value.t * indexed * hashed |
| Extender of Segment.t * node * indexed * hashed |
view constructors are private. Use _Internal, _Bud, _Leaf, and _Extender functions with runtime invariant checks.
type t = node
2 Constructors with invariant checks
2 Accessors
val indexed : node -> bool
val index : node -> Plebeia__Index.t option
val hashed : node -> bool
val index_of_view : view -> Plebeia__Index.t option
2 Tools to create Not_Indexed and Not_Hashed nodes
2 Loading of nodes
val load_node_ref :
( Plebeia__Context.t -> Plebeia__Index.t -> extender_witness -> view ) ref
Placeholder of node loading from a context
val load_node :
Plebeia__Context.t ->
Plebeia__Index.t ->
extender_witness ->
view
Node loading from a context
Obtain the view of the node. If the view is not available in the memory, it is loaded from the storage.
2 Debug
val pp : Format.formatter -> node -> unit
Pretty printer