Conversation
Contributor
martti007
commented
Dec 1, 2025
- Changed certification request structure.
- Request signature is now calculated from H(CBOR([source state hash, transaction hash]))
- Changed Request ID name to State ID
- State Id can now be calculated from certification request
… request structure
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the certification system by renaming "Request ID" to "State ID" and restructuring how certification requests are signed. The signature is now calculated from H(CBOR([source state hash, transaction hash])) instead of the previous approach, and the State ID can now be derived from the certification request itself.
Key Changes:
- Renamed
RequestIdclass toStateIdwith updated calculation logic - Replaced
AuthenticatorandLeafValueclasses with newCertificationDataclass - Updated certification request/response structure with new
CertificationRequest,CertificationResponse, andCertificationStatusclasses - Modified
InclusionProofto useCertificationDatainstead of separate authenticator and transaction hash fields
Reviewed changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| StateId.java | New file implementing State ID with updated calculation using CBOR encoding |
| CertificationData.java | New file replacing Authenticator, containing certification information and signature |
| CertificationRequest.java | New request structure for certification submissions |
| CertificationResponse.java | New response structure with optional receipt support |
| CertificationStatus.java | New enum with expanded status codes for certification outcomes |
| InclusionProof.java | Updated to use CertificationData and verify method signature changes |
| Commitment.java | Refactored to use CertificationData instead of RequestId and Authenticator |
| AggregatorClient.java | Updated interface methods to use new certification structures |
| Multiple test files | Updated tests to use new StateId and CertificationData classes |
| README.md | Updated documentation with new class names |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/org/unicitylabs/sdk/transaction/TransferCommitment.java
Outdated
Show resolved
Hide resolved
src/main/java/org/unicitylabs/sdk/transaction/MintCommitment.java
Outdated
Show resolved
Hide resolved
src/main/java/org/unicitylabs/sdk/api/CertificationRequest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/unicitylabs/sdk/api/CertificationResponse.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.