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

query packet unreceived-packets panics if relayer hasn't performed channel handshake yet #521

Closed
3 of 5 tasks
romac opened this issue Jan 14, 2021 · 0 comments · Fixed by #554
Closed
3 of 5 tasks
Assignees
Labels
A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI
Milestone

Comments

@romac
Copy link
Member

romac commented Jan 14, 2021

Crate

relayer-cli

Summary of Bug

query packet unreceived-packets panics if relayer hasn't performed channel handshake yet

Version

master (1e5f2dc6d1a0c88aa4fb4c4a9138bf1ca7f93fee)

Steps to Reproduce

  1. ./dev-env
  2. cargo run -- -c config.toml query packet unreceived-packets ibc-1 ibc-0

Output:

The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: relayer-cli/src/commands/query/packet.rs:258

https://github.com/informalsystems/ibc-rs/blob/1e5f2dc6d1a0c88aa4fb4c4a9138bf1ca7f93fee/relayer-cli/src/commands/query/packet.rs#L257

The channel.counterparty().channel_id() is None:

[relayer-cli/src/commands/query/packet.rs:255] &channel = ChannelEnd {
    state: Uninitialized,
    ordering: Unordered,
    remote: Counterparty {
        port_id: PortId(
            "defaultPort",
        ),
        channel_id: None,
    },
    connection_hops: [],
    version: "",
}

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@romac romac added A: bug Admin: something isn't working I: CLI Internal: related to the relayer's CLI labels Jan 14, 2021
@romac romac added this to the v0.1.0 milestone Jan 14, 2021
@adizere adizere mentioned this issue Jan 21, 2021
17 tasks
@adizere adizere self-assigned this Jan 26, 2021
adizere added a commit that referenced this issue Jan 27, 2021
* Fix for #521. Will fix the unwraps for QueryUnreceivedAcknowledgementCmd also

* Added the 'required' annotation to packet queries.

When a free option (such as a chain_id or port_id) in a command
is tagged with the 'required' attribute, this will safeguard against
invoking the command with `default()` values for the corresponding
option.

* Updated the changelog

* Apply suggestions from code review

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* FMT fix

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this issue Sep 13, 2022
* Fix for informalsystems#521. Will fix the unwraps for QueryUnreceivedAcknowledgementCmd also

* Added the 'required' annotation to packet queries.

When a free option (such as a chain_id or port_id) in a command
is tagged with the 'required' attribute, this will safeguard against
invoking the command with `default()` values for the corresponding
option.

* Updated the changelog

* Apply suggestions from code review

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>

* FMT fix

Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
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 I: CLI Internal: related to the relayer's CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants