Skip to content
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

solana: validate evm extra args #481

Merged
merged 3 commits into from
Jan 22, 2025
Merged

solana: validate evm extra args #481

merged 3 commits into from
Jan 22, 2025

Conversation

aalu1418
Copy link
Collaborator

@aalu1418 aalu1418 commented Jan 21, 2025

validate passed in extra args against:

  • max_per_msg_gas_limit
  • enforce_out_of_order

Copy link
Contributor

@PabloMansanet PabloMansanet left a comment

Choose a reason for hiding this comment

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

LGTM! Just one minor comment on whether to use unit or integration tests to capture this behaviour.

@@ -2374,6 +2379,78 @@ func TestCCIPRouter(t *testing.T) {
require.Equal(t, uint64(3), ccipMessageSentEvent.Message.Header.Nonce)
})

t.Run("When gasLimit is too high, it fails", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Echoing @toblich's comment on a PR of mine a while ago, this kind of validation can be captured with a Rust unit test rather than the comparatively heavier Go integration test, which I think will help us with iteration time (it's easy to run a single Rust test/group of tests, while the Go suite is more coupled and order-dependent).

I don't have a strong opinion and I wouldn't stop the merge on this, but I'd mildly prefer this to be a Rust unit test instead :).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah good point - i will need to do a bit of refactoring here anyway to support multiple types so I will move the tests in the next PR!

Copy link

Metric solana/validate-extra-args main
Coverage 76.6% 76.6%

@aalu1418 aalu1418 merged commit 8a6f4c6 into main Jan 22, 2025
17 checks passed
@aalu1418 aalu1418 deleted the solana/validate-extra-args branch January 22, 2025 20:55
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.

3 participants