Files
amethyst/quartz
Claude 9d34bb8b2e fix: tree hash type discriminant and leaf count from rightmost node
RFC 9420 Section 7.9 tree hash input includes a type discriminant byte:
- Leaf: H(uint8(1) || uint32(leaf_index) || optional<LeafNode>)
- Parent: H(uint8(2) || optional<ParentNode> || opaque left<V> || opaque right<V>)

Also fixed RatchetTree leaf count computation to use the rightmost
non-blank node position instead of total serialized node count,
since trees may be serialized with trailing blank nodes.

Test results: 35/41 passing (85%).

https://claude.ai/code/session_01NocQDWj2Y92FugjfgazzL3
2026-04-03 20:23:16 +00:00
..
2026-04-01 15:45:46 -04:00