You are in my Digital Garden.
Prolly Tree
Last modified: Sep 11th, 2026
Like a merkle tree and a B-tree had a baby.
Notes
- It’s the same as a Merkle Search Tree
- Specifically it’s the same idea and has the same properties, but the implementation is different
- The shape of the tree is insert-order independent, this is the big difference with B-trees
- “A set of items has a unique deterministic representation” - MST paper
- Each tree node is content-addressed
- Root node address is hash of whole tree
- Two hashes: a hash (later discarded) to determine chunk boundaries, and then a separate hash to get the chunk/node address
- Key concept: recursive chunking
- Only leaf nodes at the bottom of the tree hold keys, the other nodes just hold references to keys – like a B+ tree
- Internal nodes are also stored in the content-addressed storages
- Along with leaf nodes, obviously
- This allows a tree to be reconstructured from a root hash, by repeatedly looking up addresses in the storage
- Dolt uses this to create version-controlled database because it combined a necessary database structure (B-trees) with properties like immutability, fast diffs, deduplication
- Like a Merkle tree designed for querying
- Like a B-tree was content-addressed
Explainers
- https://docs.dolthub.com/architecture/storage-engine/prolly-tree
- https://www.dolthub.com/blog/2024-03-03-prolly-trees/
- https://www.dolthub.com/blog/2025-06-03-people-keep-inventing-prolly-trees/
- https://www.dolthub.com/blog/2022-06-27-prolly-chunker/
- https://www.dolthub.com/blog/2025-06-26-prolly-tree-balance/
- https://www.dolthub.com/blog/2025-07-03-regarding-prollyferation/
- Peer to Peer Databases with IPLD Prolly Trees (video) (TO WATCH)
- https://blog.mauve.moe/posts/prolly-tree-analysis
- https://github.com/attic-labs/noms/blob/master/doc/intro.md#prolly-trees-probabilistic-b-trees
- https://0fps.net/2020/12/19/peer-to-peer-ordered-search-indexes/
- https://www.dolthub.com/blog/2020-04-01-how-dolt-stores-table-data/
Merkle Search Trees
- Used by ATproto
- Original paper: https://inria.hal.science/hal-02303490/document
- https://github.com/DavidBuchanan314/merkle-search-tree
- https://atproto.com/specs/repository
- Keys are evenly distributed across layers of the tree, unlike Prolly Trees