Skip to content

Conversation

@huangzhen1997
Copy link
Contributor

@huangzhen1997 huangzhen1997 commented Nov 3, 2025

@huangzhen1997 huangzhen1997 marked this pull request as ready for review November 3, 2025 16:31
@huangzhen1997 huangzhen1997 requested a review from a team as a code owner November 3, 2025 16:31
Copilot AI review requested due to automatic review settings November 3, 2025 16:31
Copy link
Contributor

Copilot AI left a 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 refactors the TON (The Open Network) execute codec to enforce a single message per execute report constraint. The changes ensure that the codec properly validates and processes only one ramp message per execution report, aligning with TON's architectural limitations.

  • Adds validation to ensure exactly one message is present in each chain report
  • Simplifies the code by removing the loop that processed multiple messages and directly handles the single message
  • Updates test configuration to generate reports with only one message per report

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/ccip/codec/executecodec.go Adds validation for single message constraint and refactors encoding logic to handle one message directly
pkg/ccip/codec/executecodec_test.go Updates test configuration to generate only one message per report

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

})
}

// TODO, re-enable when gas limit from extra args is supported
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's pending to add the gas limit? @huangzhen1997 @vicentevieytes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There were commented out because we skipped gasLimit from the contract. But Vicente is adding them back on-chain, so we are going to uncomment this soon in another PR

@nicolasgnr
Copy link
Collaborator

@ogtownsend please review

executeReport := ocr.ExecuteReport{
SourceChainSelector: uint64(chainReport.SourceChainSelector),
Messages: rampMessages[0],
Messages: rampMessage,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the field name Messages can be singular. it's a bit misleading(same on the contract)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed plugin. Don't see where contract uses plural

Copy link
Collaborator

Choose a reason for hiding this comment

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

In offramp, but I'd suggest fixing this in contract PRs since there are many things going on
cc. @patricios-space @vicentevieytes

assert(!report.messages.beginParse().isEmpty(), Error.EmptyExecutionReport);

messages: cell; // vec<Any2TVMRampMessage>

@huangzhen1997 huangzhen1997 enabled auto-merge (squash) November 5, 2025 14:41
@patricios-space patricios-space merged commit ce915e7 into main Nov 5, 2025
41 of 42 checks passed
@patricios-space patricios-space deleted the NONEVM-2927/single-ramp-msg-in-execute-report-validation branch November 5, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants