gb_merkle_trees Erlang library has been released. It provides a dictionary-like storage for binaries using general balanced binary Merkle trees.

Its interface and mechanism are similar to stdlib’s gb_trees, with a notable difference that all trees are also Merkle trees. What follows, values are stored only on leaf nodes. Having an agreement only on the root hash of a tree, one can prove that a particular key and value combination belongs to the tree.

Applications include storing states for blockchains — see Tendermint’s Application Blockchain Interface which represents application state as Merkle root hash.

Snapshot of the documentation for 0.1.0 release has been put on IPFS.

Patches, comments and other feedback are welcome.