set-membership commitment for the registry
A 32-byte commitment to a set of up to 65 536 members, opened by a path of 16 hashes.
A binary hash tree. The root is one field element on chain; a membership proof carries the sibling hash at every level between a leaf and the root — $O(\log n)$ field elements, no more. The verifier learns only that some leaf hashes to the committed root.
Introduced by Merkle in 1989. The structure itself adds no cryptographic assumption beyond the hash it is built from; here, Poseidon2 over $F_r$. The Merkle tree is the carrier — the security level lives in the hash.
the shape — anatomy of a binary hash tree
Every non-leaf node is the hash of its two children. One root commits to the whole set.
An authentication path from a leaf to the root is the chain of sibling hashes at every level along the way. The prover knows a leaf and a path; the verifier knows only the root. The relation in question is "I know a leaf and a path that hashes to this committed root."
The path from a leaf to the root is drawn thicker in blue; the sibling at every level — the witness — is badged in amber. Everything else is structurally present but never crosses the chain boundary.
path verifier — interactive
Pick a leaf. The path lights up. The witness is the sibling at each level.
Path verification cost scales with depth, not with membership-set size. Doubling the leaf count adds one level. That's the entire trade.
parameters
Concrete numbers.
Pinned by the deployment. Tier choice is fixed at group creation — the tree shape and hash do not change once a group exists.
wiring — witness · in-circuit · on-chain
Where the Merkle tree shows up across the deployment lifecycle.
The leaves and the path live entirely in the prover's witness. The hashes run inside the circuit. The chain stores one field element — the current root $C_g$ — and nothing about who is in the set.
Cool/blue tint for the prover and in-circuit lanes — those run off-chain inside the prover. Amber for the on-chain lane — the only call site the chain actually pays for. The Merkle tree is, structurally, a witness data structure; the chain only ever sees its 32-byte projection.
security
The tree adds no assumption beyond the hash. Both horizons inherit Poseidon2's stance.
Two cards, two horizons — both green. The Merkle tree is the carrier; the security level lives entirely in the hash at the internal nodes. A second-preimage on any one of those would let an adversary substitute an alternate leaf.
Soundness reduces to Poseidon2 collision resistance.
A second-preimage on any internal node would let an adversary substitute an alternate leaf, breaking authorisation soundness. The reduction is tight: the hash gives you the tree.
- Same security level across all three depth tiers — larger trees only increase the path length, not the per-node security.
- Sponge-mode argument carries over from Poseidon2's indifferentiability proof.
- The membership relation $R_{\mathrm{Mem}}$ is the in-circuit verification of the path; soundness of $R_{\mathrm{Mem}}$ is exactly soundness of the path checks.
Inherits the hash's PQ stance. The tree adds zero further quantum vulnerability.
Grover halves the bit-security level on collision resistance; no Shor-style attack applies to a hash-based tree. The security delta vs Poseidon2 alone is zero.
- In a PQ-secure configuration the Merkle structure is unchanged — only the surrounding SNARK and curve change.
- The "what breaks under Shor" caveat lives entirely in the SNARK + curve, not in the membership data structure.
- A wider Poseidon2 (state width $t$, digest size) recovers the bit-security margin without touching the tree's shape.
binary tiered vs sparse merkle vs verkle
Three membership-set commitments. Three different trades.
Binary tiered is the smallest moving-parts choice for a fixed-scale membership set. Sparse Merkle pays a per-update cost for non-membership support over a key universe. Verkle trades the post-quantum break for shallower trees.
Binary tiered
- Structure
- binary hash tree · arity 2
- Depth
- $O(\log n)$ · 8 / 12 / 16 levels
- Witness size
- 32 B × depth
- In-circuit cost dominator
- Poseidon2 path verify · depth × ~50–200 / call
- PQ stance
- conjectured PQ-secure · inherits hash
- Supports non-membership
- no · membership only
- Representative deployment
- this deployment · tiered membership registries
Sparse Merkle
- Structure
- binary tree over all 2^k keys (e.g. $k = 256$)
- Depth
- fixed = key bit-length
- Witness size
- larger · padding hashes along empty branches
- In-circuit cost dominator
- per-update cost is higher — more sibling hashes to recompute
- PQ stance
- conjectured PQ-secure · inherits hash
- Supports non-membership
- yes · and membership
- Representative deployment
- Aztec · Ethereum state trie
Verkle
- Structure
- k-ary tree · vector commitment per node
- Depth
- $\log_k n$ · much shallower than binary
- Witness size
- smaller · single opening per level
- In-circuit cost dominator
- polynomial recommit on update
- PQ stance
- broken under Shor · KZG inherits curve break
- Supports non-membership
- no · membership only
- Representative deployment
- Ethereum state-trie successor proposal
Binary tiered is the smallest moving-parts choice for a fixed-scale membership set. Sparse Merkle pays a per-update cost for non-membership support over the full key universe. Verkle trades the post-quantum break for shallower trees and smaller proofs.
references
Primary literature.
Two sources. The original Merkle construction, and the Poseidon2 paper that supplies the hash at the internal nodes.
- A Certified Digital Signature. CRYPTO '89, 218–238.
- Poseidon2: A Faster Version of the Poseidon Hash Function. IACR ePrint 2023/323.