Skip to content

Add field in callbacks data for custom calldata #8353

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

Merged
merged 11 commits into from
May 28, 2025

Conversation

AdityaSripal
Copy link
Member

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@codecov-commenter
Copy link

codecov-commenter commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.68%. Comparing base (a5ad744) to head (52b6a36).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8353      +/-   ##
==========================================
+ Coverage   61.62%   61.68%   +0.05%     
==========================================
  Files         299      299              
  Lines       21462    21494      +32     
==========================================
+ Hits        13227    13259      +32     
  Misses       7643     7643              
  Partials      592      592              
Flag Coverage Δ
08-wasm 66.28% <ø> (ø)
e2e 1.18% <ø> (ø)
ibc-go 67.77% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AdityaSripal AdityaSripal marked this pull request as ready for review May 21, 2025 15:45

calldata, err := hex.DecodeString(calldataStr)
if err != nil {
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure this should not return an error?

@AdityaSripal
Copy link
Member Author

Introduced tighter validation of callback data in memo. Though adding errors in all the helper functions is a bit ugly.

Let me know if you would prefer panics.

I'm finishing up testing this when I am back

@gjermundgaraba
Copy link
Contributor

Sounds good. Errors seems fine, easier to test 🤷

Copy link
Contributor

@DeshErBojhaa DeshErBojhaa left a comment

Choose a reason for hiding this comment

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

One minor suggestion. Other than that, LGTM!

@@ -228,6 +228,55 @@ func (s *CallbacksTypesTestSuite) TestGetCallbackData() {
true,
nil,
},
{
"success: source callback with calldata",
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: we allow calldata on either side in ibc-go. EVM contract keeper will enforce calldata only set for dest calldata

Copy link
Contributor

@gjermundgaraba gjermundgaraba left a comment

Choose a reason for hiding this comment

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

It looks good to me, but I would like to understand why codecov thinks the lines are not covered 🤔

Copy link
Contributor

@DeshErBojhaa DeshErBojhaa left a comment

Choose a reason for hiding this comment

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

utACK!

Copy link
Contributor

@gjermundgaraba gjermundgaraba left a comment

Choose a reason for hiding this comment

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

Heck yeah! Great work 🙏

@gjermundgaraba gjermundgaraba merged commit 7d579b9 into main May 28, 2025
51 checks passed
@gjermundgaraba gjermundgaraba deleted the aditya/cb-custom-calldata branch May 28, 2025 14:22
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.

4 participants