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

feat: add channel version to core app callbacks #6902

Conversation

gjermundgaraba
Copy link
Contributor

Description

closes: #195


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.

@colin-axner colin-axner self-assigned this Jul 22, 2024
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Nice work! The changes look good, there is an issue in ics29 though. Versions can be wrapped and when this version is passed down through the calls, it needs to be unwrapped (in a similar fashion to GetAppVersion)

modules/apps/27-interchain-accounts/host/ibc_module.go Outdated Show resolved Hide resolved
modules/apps/27-interchain-accounts/host/ibc_module.go Outdated Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware.go Outdated Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware.go Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware.go Show resolved Hide resolved
modules/apps/transfer/ibc_module.go Outdated Show resolved Hide resolved
Copy link
Member

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Nice start! I believe its at mergable state after addressing @colin-axner feedback.

Can we also remove or deprecate GetAppVersion now that we've made this change?

modules/core/05-port/types/module.go Outdated Show resolved Hide resolved
modules/core/keeper/msg_server.go Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware.go Outdated Show resolved Hide resolved
@colin-axner
Copy link
Contributor

Can we also remove or deprecate GetAppVersion now that we've made this change?

No, the version still needs to be unwrapped for others uses (async packets or migrations). The port router refactor will address this interface though

@gjermundgaraba
Copy link
Contributor Author

I've added app version callbacks, let me know if how I did it is reasonable or if it should be done differently @colin-axner

modules/apps/29-fee/ibc_middleware_test.go Outdated Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware_test.go Outdated Show resolved Hide resolved
modules/apps/29-fee/ibc_middleware_test.go Outdated Show resolved Hide resolved
testing/mock/ibc_module.go Outdated Show resolved Hide resolved
testing/mock/middleware.go Outdated Show resolved Hide resolved
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Nice work @gjermundgaraba! Thanks for the quick implementations and quick followup. The changes look great to me 👍

@colin-axner colin-axner removed their assignment Jul 24, 2024
Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

lgtm!

@gjermundgaraba gjermundgaraba added this pull request to the merge queue Jul 26, 2024
Copy link

sonarcloud bot commented Jul 26, 2024

Merged via the queue into main with commit 954d8bd Jul 26, 2024
67 of 69 checks passed
@gjermundgaraba gjermundgaraba deleted the gjermund/195-provide-channel-version-in-recv-acknowledge-and-timeout-app-callbacks branch July 26, 2024 09:29
mergify bot pushed a commit that referenced this pull request Jul 26, 2024
* feat: add channel version to core app callbacks

* refactor 05-port module interface signature with channel version after ctx

* unwrap app version in ics29

* panic on unwrap app version and update mock apis

* discard unused variables

---------

Co-authored-by: DimitrisJim <[email protected]>
(cherry picked from commit 954d8bd)
colin-axner added a commit that referenced this pull request Jul 30, 2024
* feat: add channel version to core app callbacks

* refactor 05-port module interface signature with channel version after ctx

* unwrap app version in ics29

* panic on unwrap app version and update mock apis

* discard unused variables

---------

Co-authored-by: DimitrisJim <[email protected]>
(cherry picked from commit 954d8bd)

Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v9.0.x priority PRs that need prompt reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide channel version in Recv, Acknowledge, and Timeout app callbacks
5 participants