Skip to content

#75 Switch SMT inclusion verification from version 3o to 6a#76

Merged
MastaP merged 9 commits into
issue-73from
issue-75
Jul 17, 2026
Merged

#75 Switch SMT inclusion verification from version 3o to 6a#76
MastaP merged 9 commits into
issue-73from
issue-75

Conversation

@martti007

Copy link
Copy Markdown
Contributor

No description provided.

@martti007
martti007 requested a review from MastaP July 6, 2026 13:58

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces SparseMerkleTreePathUtils to compute path regions, updates hash calculations in InclusionCertificate and FinalizedNodeBranch to include these regions, and simplifies the tree-building logic in both SparseMerkleTree and SparseMerkleSumTree. Feedback highlights performance and safety issues in pathToRegion due to excessive BigInteger allocations and potential out-of-bounds exceptions, suggesting an optimized implementation using toByteArray(). Additionally, it is recommended to replace compareTo with equals when checking path equality in the tree-building methods for better performance and readability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/main/java/org/unicitylabs/sdk/smt/SparseMerkleTreePathUtils.java Outdated
Comment thread src/main/java/org/unicitylabs/sdk/smt/radix/SparseMerkleTree.java Outdated
Comment thread src/main/java/org/unicitylabs/sdk/smt/radixsum/SparseMerkleSumTree.java Outdated
@MastaP MastaP added this to Unicity Jul 17, 2026
@MastaP MastaP moved this to Test in Unicity Jul 17, 2026
@MastaP
MastaP merged commit d8f8d36 into issue-73 Jul 17, 2026
1 check passed
@MastaP
MastaP deleted the issue-75 branch July 17, 2026 13:18
@github-project-automation github-project-automation Bot moved this from Test to Done in Unicity Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Switch SMT inclusion verification from version 3o to 6a

3 participants