Skip to main content
BinaryTree (BinaryTreeType) implements the EIP-7864 unified binary state tree: a single Merkle tree replacing Ethereum’s separate account and storage Merkle Patricia Tries by mapping 32-byte keys into a 31-byte binary stem (248 bits) and a 1-byte leaf index (0..255), hashed with BLAKE3.

Key Layout (32 Bytes)

Grouping 256 consecutive slots under one StemNode keeps account headers, code chunks, and adjacent storage slots co-located in the same witness branch.

Quick Start

Import from @tevm/voltaire or @tevm/voltaire/BinaryTree.

API Reference

Tree-shakeable factories accepting custom { blake3 }: HashInternal, HashStem, HashLeaf, HashNode.
  • Trie — Legacy Keccak-256 hexary Merkle Patricia Trie
  • State — (address, slot) storage keys
  • Blake2 — Related cryptographic hashing primitives