Skip to content

#79 Change SMT bit ordering#80

Open
martti007 wants to merge 3 commits into
remove-nametagfrom
issue-79
Open

#79 Change SMT bit ordering#80
martti007 wants to merge 3 commits into
remove-nametagfrom
issue-79

Conversation

@martti007

Copy link
Copy Markdown
Contributor

No description provided.

@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 refactors the Sparse Merkle Tree (SMT) and Sparse Merkle Sum Tree implementations, replacing the previous BigInteger-based tree routing with a more efficient byte-array-based routing mechanism. It introduces helper utilities in SparseMerkleTreePathUtils and cleans up unused classes and exceptions. The review feedback highlights several opportunities to improve robustness, specifically by adding input validation for parameters like depth, maxDepth, and key to prevent potential out-of-bounds exceptions, and by explicitly masking byte operations with 0xff in getBitAtDepth to avoid implicit sign extension.

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/api/InclusionCertificate.java
@martti007 martti007 linked an issue Jul 10, 2026 that may be closed by this pull request
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.

Sync Java SDK SMT/RSMT bit ordering with the spec

1 participant