Skip to content

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

Open
martti007 wants to merge 3 commits into
issue-73from
issue-75
Open

#75 Switch SMT inclusion verification from version 3o to 6a#76
martti007 wants to merge 3 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/radix/SparseMerkleTree.java Outdated
Comment thread src/main/java/org/unicitylabs/sdk/smt/radixsum/SparseMerkleSumTree.java Outdated
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.

Switch SMT inclusion verification from version 3o to 6a

1 participant