Merkle Proofs
When you resolve a name, the API returns a Merkle membership proof -- 128 sibling hashes from the Sparse Merkle Tree. This lets you verify the resolution without trusting the server.
How Verification Works
leaf = SHA-256(address)
key = SHA-256("alice")
current_root
|
/ \
/ \
... ...
/ \
sibling[127] leaf(alice)
Hash the leaf up through the 128 levels using the sibling hashes. If you arrive at the advertised smt_root, the resolution is correct.
The Sparse Merkle Tree
ZecNames uses a depth-128 SHA-256 Sparse Merkle Tree (SMT):
- Depth 128 -- 2^128 possible slots, no collisions
- SHA-256 at every level for deterministic hashing
- Non-membership proofs -- verify a name is not taken (needed during registration)
- Membership proofs -- verify a name is registered (returned on resolution)
Deterministic State
Two independent indexers processing the same blocks must produce the same SMT root. A mismatch means one is wrong.
Check the current root: GET /v1/state/root