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

Return error for uninitialized connection end or channel end query result #923

Merged
merged 3 commits into from
May 11, 2021

Conversation

ancazamfir
Copy link
Collaborator

@ancazamfir ancazamfir commented May 11, 2021

Closes: #875
Closes: #920

Description

  • changed query_channel() and query_connection() to return error if the end is in Uninitialized State
  • the change revealed a bug in the height of a channel query when checking state before sending acknowledgment packets. The old query was done with a height of the counterparty chain but because it was returning an Uninitialized channel the check for channel close was passing.
  • new output:
$ hermes query connection end ibc-0 connection-100
...
Error: Query error occurred (failed to query for connection 'connection-100'): connection does not exist

$ hermes query channel end ibc-0 transfer channel-100
...
Error: Query error occurred (failed to query for port 'transfer' channel 'channel-100'): channel does not exist

For contributor use:

  • Updated the Unreleased section of CHANGELOG.md with the issue.
  • If applicable: Unit tests written, added test to CI.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments.
  • Re-reviewed Files changed in the Github PR explorer.

@ancazamfir ancazamfir changed the title Return query error if uninitialized conn/chan Return error for uninitialized connection end or channel end query result May 11, 2021
relayer/src/chain/cosmos.rs Outdated Show resolved Hide resolved
relayer/src/chain/cosmos.rs Outdated Show resolved Hide resolved
@ancazamfir ancazamfir merged commit 64f8dd1 into master May 11, 2021
@ancazamfir ancazamfir deleted the anca/conn_chan_uninit branch May 11, 2021 14:45
ancazamfir added a commit that referenced this pull request May 26, 2021
* Added a worker for  channel 

* Added query_connection_channels to the chain handle and runtime

* Redo #923 to return `Uninitialized` when empty value bytes are returned

* Changed the CLI to return error if connection/ channel does not exist

* Allow entering the destination channel id in `hermes tx raw chan-open-try...` 

* Change `strategy` in config to be either `packets`(only relay packets) or `all` (relay from all events)

* e2e CI changes

Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>
Co-authored-by: Adi Seredinschi <adi@informal.systems>
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
…sult (informalsystems#923)

* Return query error if uninitialized conn/chan

* Consistent output for query connection and channel comands

* Apply suggestions from code review

Co-authored-by: Romain Ruetschi <romain@informal.systems>
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
* Added a worker for  channel 

* Added query_connection_channels to the chain handle and runtime

* Redo informalsystems#923 to return `Uninitialized` when empty value bytes are returned

* Changed the CLI to return error if connection/ channel does not exist

* Allow entering the destination channel id in `hermes tx raw chan-open-try...` 

* Change `strategy` in config to be either `packets`(only relay packets) or `all` (relay from all events)

* e2e CI changes

Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>
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
2 participants