package plebeia

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Merkle_proof.TreeSource

Merkle proof tree. Hash only nodes are expressed by Hash

Sourceval pp : Format.formatter -> t -> unit
Sourceval snapshot : Context.t -> t -> Snapshot.t

snapshot ctxt tree builds the snapshot of proof tree tree. Disk nodes in tree are loaded from the context ctxt while snapshooting.

The encoding of the proof tree. The context is used to load Disk nodes and hash calculation.

Sourceval make : Context.t -> Node_type.t -> Path.t list -> t * (Path.t * Node_type.t option) list

make ctxt n paths returns the Merkle proof tree of paths of node n under context ctxt and the nodes found (or not found) at paths.

The proof tree may contain Disk nodes which require ctxt to be loaded. To export the proof out of the context, use snapshot or encoding to load all the nodes.

  • n must point to a Bud, otherwise the function fails with Invalid_argument.
Sourceval compute_hash : Hash.Hasher.t -> t -> Hash.t * t

Returns the hashed proof tree and its top hash.

The proof tree must be Disk free, otherwise the function fails.

Sourceval check : t -> Path.t list -> (Path.t * Node_type.t option) list

check paths tree finds paths in the proof tree tree.

OCaml

Innovation. Community. Security.