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

Fix client upgrade #2304

Merged
merged 11 commits into from
Jun 17, 2022
Merged

Fix client upgrade #2304

merged 11 commits into from
Jun 17, 2022

Conversation

plafer
Copy link
Contributor

@plafer plafer commented Jun 15, 2022

Closes: #2185

Description

I did not add a query_chain_height() vs query_latest_application_height(), as the query_chain_height() would only be used in the special case of a client upgrade. Also, I now think it would be best if the cli for client upgrade forced the user to specify the chain upgrade height: it would be better UX IMO, and we wouldn't need to ever query the "chain height" (i.e. tendermint height). To be considered when dealing with #2300.


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

Copy link
Member

@adizere adizere left a comment

Choose a reason for hiding this comment

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

Left some improvement suggestions.

relayer/src/chain/cosmos.rs Outdated Show resolved Hide resolved
relayer/src/foreign_client.rs Outdated Show resolved Hide resolved
relayer/src/foreign_client.rs Show resolved Hide resolved
relayer-cli/src/commands/tx/client.rs Show resolved Hide resolved
relayer-cli/src/commands/tx/client.rs Outdated Show resolved Hide resolved
relayer-cli/src/commands/tx/client.rs Show resolved Hide resolved
relayer/src/foreign_client.rs Show resolved Hide resolved
@ancazamfir
Copy link
Collaborator

Can we add an integration test for client upgrade? Maybe in a different PR?

@plafer
Copy link
Contributor Author

plafer commented Jun 16, 2022

I would vote for a different PR; I never looked into our integration framework, and I currently don't have the capacity to delve into it. But I agree that it is desirable; I'll create one and assign myself as an opportunity to learn it.

Copy link
Collaborator

@ancazamfir ancazamfir left a comment

Choose a reason for hiding this comment

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

Great work @plafer! Happy to see the original issue solved and looking forward to the #2300 improvement.

@plafer plafer merged commit c2b5a64 into master Jun 17, 2022
@plafer plafer deleted the plafer/2185-client-upgrade branch June 17, 2022 15:17
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
* use appropriate query height in upgrade

* changelog

* use application height in build_update_client

* don't wait for target height

* better error message

* Update relayer/src/foreign_client.rs

Co-authored-by: Adi Seredinschi <adi@informal.systems>

* docstrings and var name change

* use ibc::Height::decrement

* add warning

* query_latest_height call once

Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
Co-authored-by: Adi Seredinschi <adi@informal.systems>
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.

Client Ugrade Command Not Working in v0.14.1
3 participants