ZK & Compressionmerkle-tree
Merkle Tree
A Merkle tree is a binary hash tree in which every leaf node contains a cryptographic hash of a data block, and every non-leaf (internal) node contains the hash of its two children, such that the single root hash cryptographically commits to the entire dataset and any modification to any leaf produces a detectably different root. In Solana, Merkle trees underpin state compression: the SPL Account Compression program maintains Concurrent Merkle Trees on-chain with only the root hash persisted in account storage, while all leaf data is derivable from transaction logs. The Poseidon hash function is preferred over SHA-256 for ZK-friendly Merkle trees because it is algebraically efficient inside arithmetic circuits used for zero-knowledge proof generation.
Related terms
2ZK & Compression
Merkle Proof
A Merkle proof is the minimal set of sibling node hashes (the proof path) along the branch from a specific leaf to the t...
ZK & Compression
State Compression
State Compression is Solana's technique for storing the cryptographic fingerprint (root hash) of a Merkle tree on-chain...