Update the SMT code from the current 3o-style node commitment to the v6a construction from rsmt6a.py.
Scope:
- No backwards compatibility required; this is a coordinated pre-production rollover.
- Leaf hash stays unchanged: it still commits to the full key and value.
- Inclusion proof shape stays unchanged: bitmap/depth set + sibling hashes.
- Internal node hash changes to also commit to the node's canonical region/prefix.
- This repo does not need to generate or verify append-only consistency proofs.
Implementation notes:
- Old 3o node commitment was effectively:
H_node(depth, left_hash, right_hash)
- New v6a node commitment is:
H_node(depth, region, left_hash, right_hash)
region is the canonical prefix for that node at depth, using this repo's existing key bit order, endian-ness, and packing conventions.
- During inclusion proof verification, no extra proof field is needed. Recompute
region = prefix(proven_key, depth) at each sibling-combine step.
Acceptance:
- Update root/inclusion verification tests to v6a hashes.
- Verify shared interop vectors generated by aggregator-go, JS, Rust, and Java.
- Generate Java vectors for the other repos to verify.
- Include cases for empty tree, one leaf, shallow split, deep split, and multi-leaf tree.
Update the SMT code from the current 3o-style node commitment to the v6a construction from
rsmt6a.py.Scope:
Implementation notes:
H_node(depth, left_hash, right_hash)H_node(depth, region, left_hash, right_hash)regionis the canonical prefix for that node atdepth, using this repo's existing key bit order, endian-ness, and packing conventions.region = prefix(proven_key, depth)at each sibling-combine step.Acceptance: