-
Notifications
You must be signed in to change notification settings - Fork 5
commit report codec merkle root validation #569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
commit report codec merkle root validation #569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enforces TON blockchain's requirement that commit reports contain exactly one unblessed merkle root, aligning the codec with on-chain contract constraints.
Changes:
- Added validation in the commit codec to enforce exactly one unblessed merkle root per report
- Migrated merkle roots from blessed to unblessed status throughout the codebase
- Updated test cases to validate the new single merkle root requirement
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/ccip/codec/commitcodec.go | Added validation requiring exactly 1 unblessed merkle root; removed blessed merkle root handling |
| pkg/ccip/codec/commitcodec_test.go | Removed second merkle root from test data; added test cases for merkle root count validation |
| pkg/ccip/chainaccessor/ton_accessor.go | Changed merkle roots from blessed to unblessed status |
| integration-tests/smoke/chainaccessor/accessor_test.go | Updated assertions to check unblessed instead of blessed merkle roots |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // TON does not support RMN verification, so BlessedMerkleRoots will be ignored. | ||
| // TON on-chain OffRamp requires exactly one merkle root per commit report. | ||
| // See Error.BatchingNotSupported in contracts/contracts/ccip/offramp/contract.tolk | ||
| if len(report.UnblessedMerkleRoots) != 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vicentevieytes Does this look right to you
No description provided.