Skip to content

feat: join two key proofs into one trie#1396

Draft
demosdemon wants to merge 1 commit intobrandon.leblanc/proof-triefrom
brandon.leblanc/joined-key-proofs
Draft

feat: join two key proofs into one trie#1396
demosdemon wants to merge 1 commit intobrandon.leblanc/proof-triefrom
brandon.leblanc/joined-key-proofs

Conversation

@demosdemon
Copy link
Contributor

@demosdemon demosdemon commented Oct 29, 2025

This change adds support for merging key proof tries to create key range proof tries, along with error handling for merge failures and corresponding test coverage.

  • Added KeyRangeProofTrieRoot to represent the merged result of zero, one, or two key proof tries, allowing construction of a trie that bounds a key range. This includes logic for merging tries and handling unbounded ranges.
  • Implemented the merge and merge_opt methods for KeyProofTrieRoot and KeyProofTrieNode, enabling iterative merging of key proof tries and their nodes.
  • Added MergeKeyProofError for detailed errors of merge failures, including disjoint edges, disjoint children, differing hashes, and duplicate keys with different values.

@demosdemon demosdemon force-pushed the brandon.leblanc/proof-trie branch from f67a1af to a1daa93 Compare October 29, 2025 18:10
@demosdemon demosdemon force-pushed the brandon.leblanc/joined-key-proofs branch from 55574bd to c0d037d Compare October 31, 2025 17:01
@demosdemon demosdemon force-pushed the brandon.leblanc/proof-trie branch from a1daa93 to a3246b0 Compare October 31, 2025 17:01
@demosdemon demosdemon force-pushed the brandon.leblanc/proof-trie branch from a3246b0 to 497272d Compare October 31, 2025 22:47
@demosdemon demosdemon force-pushed the brandon.leblanc/joined-key-proofs branch from c0d037d to 7d6fdba Compare October 31, 2025 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant