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

Hermes ft-transfer returns unhelpful error when using non-Open channel #960

Closed
5 of 7 tasks
adizere opened this issue May 19, 2021 · 0 comments · Fixed by #961
Closed
5 of 7 tasks

Hermes ft-transfer returns unhelpful error when using non-Open channel #960

adizere opened this issue May 19, 2021 · 0 comments · Fixed by #961
Assignees
Labels
A: bug Admin: something isn't working
Milestone

Comments

@adizere
Copy link
Member

adizere commented May 19, 2021

Crate

ibc-relayer-cli

Summary of Bug

If we invoke Hermes ft-transfer with a ChannelEnd in state Init (as opposed to Open), then the error returned is not very helpful:

hermes --json tx raw ft-transfer ibc-1 ibc-0 transfer channel-2 10000 -o 1000 -n

{"result":"tx error: failed with underlying cause: deliver_tx reports error: log=Log("failed to execute message; message index: 0: packet failed basic validation: invalid destination channel ID: identifier cannot be blank: invalid identifier")","status":"error"}

Version

b1c4bb8

Steps to Reproduce

  • start two chains ibc-0 and ibc-1
  • create a connection between them
    • hermes create connection ibc-0 ibc-1
    • suppose that the newly created connection on chain ibc-0 (side a) has connection id connection-2
  • start the channel open handshake on side ibc-0 on top of connection connection-2
    • hermes tx raw chan-open-init ibc-0 ibc-1 connection-2 transfer transfer
    • suppose that the newly created channel has id channel-3, note that this channel has state Init
  • now try to submit a ft-transfer to destination ibc-1 and source ibc-0 / channel-3
    • hermes --json tx raw ft-transfer ibc-1 ibc-0 transfer channel-3 10000 -o 1000 -n 2

The returner error will be:

{"result":"tx error: failed with underlying cause: deliver_tx reports error: log=Log("failed to execute message; message index: 0: packet failed basic validation: invalid destination channel ID: identifier cannot be blank: invalid identifier")","status":"error"}

Acceptance Criteria

  • Hermes will not try to send a MsgTransfer on a non-open channel
  • Hermes will return a more helpful message when ft-transfer is invoked for a non-open channel

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@adizere adizere added the A: bug Admin: something isn't working label May 19, 2021
@adizere adizere added this to the 05.2021 milestone May 19, 2021
@adizere adizere self-assigned this May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Admin: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant