In this track: Trees, roots and proofs
Sorted pairs versus ordered pairs
Position-sensitive and commutative trees require different proof rules.
A pair of names can be treated as an unordered team or as first and second place.
This example hashes UTF-8 A, B, C and D. The displayed hashes are abbreviated, and the tree uses the playground’s sorted-pair convention.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Define ordered combination
An ordered tree hashes left child followed by right child. Swapping children normally changes its parent digest.
Define sorted combination
A sorted-pair tree orders child hashes by its comparison rule before hashing. The verifier can combine a current node and sibling without a separate left/right bit for that pair.
Do not infer list position
A sorted-pair membership proof does not by itself establish an original list index. Membership and position are different claims.
Check library compatibility
Two tools both labeled Merkle may disagree on ordering, leaf encoding and tree shape. Compare complete construction conventions before sharing roots or proofs.
Follow the proof model
Convention: UTF-8 leaves, Keccak-256, lexicographically sorted hash pairs
leaf A: 0x03783fac2efed8fbc9ad443e592ee30e61d65f471140c10ca155e937b435b760
sibling B: 0x1f675bff07515f5df96737194ea945c36c41e7b4fcef307b7cd4d0e602a69111
parent AB: 0x69de756fea16daddbbdccf85c849315f51c0b50d111e3d2063cab451803324a0
sibling parent CD: 0xe62e1dfc08d58fd144947903447473a090c958fe34e2425d578237fcdf1ab5a4
root: 0x4e2b32e9c7b10ee15f38192ed65b95656a84e32531157b9384ef0d3cabe95956Binary examples use the stated local playground convention. They are not Ethereum account or storage trie proofs.
Does a sorted-pair proof alone establish the original list index?
It establishes membership under the construction, not an arbitrary positional claim.
Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.