plebeia

Merkle Patricia tree implementation
Library plebeia
exception LoadFailure of Error.t
val parse_cell : Plebeia__Storage.storage -> Plebeia__Index.t -> Plebeia__Node.view

Exposed for test

val commit_node : Plebeia__Context.t -> Plebeia__Bud_cache.t -> Plebeia__Node.node -> Plebeia__Node.node * Plebeia__Index.t * Hash.t

Write a node to the storage, and returns the updated version of the node with its index and hash.

Note that an explict call of Storage.Checkpoint.check is required to make the written nodes accessible after a program termination.

val load_node : Plebeia__Context.t -> Plebeia__Index.t -> Plebeia__Node.extender_witness -> Plebeia__Node.view

Read the node from context.array, parse it and create a view node with it.

val load_node_fully : Plebeia__Context.t -> Plebeia__Node.node -> Plebeia__Node.node

Recusively visit and load all the subnodes in memory. Only for test purposes. Not tail recursive.

val equal : Plebeia__Context.t -> Plebeia__Node.node -> Plebeia__Node.node -> ( unit, Plebeia__Node.node * Plebeia__Node.node ) Result.t