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

add explicit checks in OnChanUpgradeTry callback of ICA host #5519

Merged
merged 4 commits into from
Jan 9, 2024

Conversation

crodriguezvega
Copy link
Contributor

@crodriguezvega crodriguezvega commented Jan 4, 2024

Description

ref: #5462 (comment)

closes: #XXXX

Commit Message / Changelog Entry

type: commit message

see the guidelines for commit messages. (view raw markdown for examples)


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/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (b68c4aa) 81.20% compared to head (a00f4f0) 81.19%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5519      +/-   ##
==========================================
- Coverage   81.20%   81.19%   -0.02%     
==========================================
  Files         197      197              
  Lines       15235    15253      +18     
==========================================
+ Hits        12372    12384      +12     
- Misses       2400     2404       +4     
- Partials      463      465       +2     
Files Coverage Δ
.../apps/27-interchain-accounts/host/keeper/keeper.go 90.00% <100.00%> (+0.48%) ⬆️
...ules/apps/27-interchain-accounts/types/metadata.go 79.79% <ø> (ø)
...ps/27-interchain-accounts/host/keeper/handshake.go 87.37% <84.21%> (-4.93%) ⬇️

@@ -84,6 +85,15 @@ func (Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", fmt.Sprintf("x/%s-%s", exported.ModuleName, icatypes.ModuleName))
}

// getConnectionID returns the connection id for the given port and channelIDs.
func (k Keeper) getConnectionID(ctx sdk.Context, portID, channelID string) (string, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this function so that we could verify that connection hops doesn't change.

Copy link
Contributor

@charleenfei charleenfei left a comment

Choose a reason for hiding this comment

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

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, left some minor nits on comments/code cov

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Thanks @crodriguezvega, LGTM! 🚀

Agree with suggestions from the others :)

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.

ACK changes

@crodriguezvega
Copy link
Contributor Author

Thank you very much for the reviews everyone, and 💚 🙇 🙏 to @charleenfei for addressing the review comments!

@crodriguezvega crodriguezvega merged commit 7a72df0 into main Jan 9, 2024
62 checks passed
@crodriguezvega crodriguezvega deleted the carlos/upgrade-try-cb-ica-host branch January 9, 2024 19:18
mergify bot pushed a commit that referenced this pull request Jan 9, 2024
* add explicit checks in on chan upgrade try callback of ica host

* pr review

* Update modules/apps/27-interchain-accounts/host/keeper/handshake.go

---------

Co-authored-by: Charly <charly@interchain.io>
Co-authored-by: Charly <charly@interchain.berlin>
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
(cherry picked from commit 7a72df0)
crodriguezvega added a commit that referenced this pull request Jan 9, 2024
#5558)

* add explicit checks in on chan upgrade try callback of ica host

* pr review

* Update modules/apps/27-interchain-accounts/host/keeper/handshake.go

---------

Co-authored-by: Charly <charly@interchain.io>
Co-authored-by: Charly <charly@interchain.berlin>
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
(cherry picked from commit 7a72df0)

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
charleenfei added a commit that referenced this pull request Jan 11, 2024
* add explicit checks in on chan upgrade try callback of ica host

* pr review

* Update modules/apps/27-interchain-accounts/host/keeper/handshake.go

---------

Co-authored-by: Charly <charly@interchain.io>
Co-authored-by: Charly <charly@interchain.berlin>
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
charleenfei added a commit that referenced this pull request Jan 11, 2024
* add explicit checks in on chan upgrade try callback of ica host

* pr review

* Update modules/apps/27-interchain-accounts/host/keeper/handshake.go

---------

Co-authored-by: Charly <charly@interchain.io>
Co-authored-by: Charly <charly@interchain.berlin>
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
channel-upgradability Channel upgradability feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants