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

Check version field of message in ConnOpenInit handler #2063

Merged
merged 7 commits into from
Apr 6, 2022

Conversation

plafer
Copy link
Contributor

@plafer plafer commented Apr 4, 2022

Closes: cosmos/ibc-rs#51

Description

We previously ignored the version in the message when handling a MsgConnOpenInit. This PR fixes this in a manner compliant with ICS 003.

Relevant part of the spec is here (search for A specific version can optionally be passed).


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@romac romac changed the title Plafer/2062 conn open init version Check version field of message in ConnOpenInit handler Apr 5, 2022
@romac romac self-assigned this Apr 5, 2022
want_pass: false,
},
Test {
name: "No version in MsgConnectionOpenInit msg".to_string(),
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a test for when there is a version mismatch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@romac romac left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for catching that! Would be nice to add one more test for when there is a version mismatch but otherwise LGTM :)

@romac romac merged commit 02b2d3f into master Apr 6, 2022
@romac romac deleted the plafer/2062-conn-open-init-version branch April 6, 2022 08:31
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
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.

2 participants