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 VerifyChannelUpgradeSequence method + tests #3332

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Mar 23, 2023

Description

closes: #1608


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 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.

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.

Looks good to me!

@codecov-commenter
Copy link

codecov-commenter commented Mar 24, 2023

Codecov Report

Merging #3332 (8b148fe) into damian/1618-chan-upgrade-init (fb9fad0) will increase coverage by 0.03%.
The diff coverage is 86.36%.

Additional details and impacted files

Impacted file tree graph

@@                        Coverage Diff                        @@
##           damian/1618-chan-upgrade-init    #3332      +/-   ##
=================================================================
+ Coverage                          78.24%   78.28%   +0.03%     
=================================================================
  Files                                186      186              
  Lines                              12951    12973      +22     
=================================================================
+ Hits                               10134    10156      +22     
+ Misses                              2384     2383       -1     
- Partials                             433      434       +1     
Impacted Files Coverage Δ
modules/core/03-connection/keeper/verify.go 79.84% <86.36%> (+0.62%) ⬆️

... and 1 file with indirect coverage changes

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.

lgtm!

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

LGTM!

upgradeSequenceKey := host.ChannelUpgradeSequenceKey(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID)
proof, proofHeight := suite.chainA.QueryProof(upgradeSequenceKey)

err = suite.chainB.GetSimApp().IBCKeeper.ConnectionKeeper.VerifyChannelUpgradeSequence(suite.chainB.GetContext(), path.EndpointB.GetConnection(), malleateHeight(proofHeight, 0), proof, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, expectedUpgradeSequence)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same nit as here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is almost certainly not required!

Base automatically changed from damian/1618-chan-upgrade-init to 04-channel-upgrades March 28, 2023 11:20
@chatton chatton marked this pull request as ready for review March 28, 2023 11:46
@chatton chatton enabled auto-merge (squash) March 28, 2023 11:46
@damiannolan
Copy link
Member

LFG

@chatton chatton merged commit 725c13c into 04-channel-upgrades Mar 28, 2023
@chatton chatton deleted the cian/issue#1608-add-verifychannelupgradesequence-method-to-03-connection branch March 28, 2023 11:58
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.

5 participants