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

Crash during chanOpenAck verification #64

Closed
5 tasks
hu55a1n1 opened this issue Dec 6, 2021 · 0 comments · Fixed by informalsystems/hermes#1650
Closed
5 tasks

Crash during chanOpenAck verification #64

hu55a1n1 opened this issue Dec 6, 2021 · 0 comments · Fixed by informalsystems/hermes#1650
Assignees

Comments

@hu55a1n1
Copy link
Contributor

hu55a1n1 commented Dec 6, 2021

Crate

ibc

Summary of Bug

The chanOpenAck handler calls the verify_channel_proofs() function which unwrap()s the channelEnd's counterparty channel id which is None since it hasn't been set yet.
Here's the crash log from basecoin-rs ->

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/hussaini/Documents/ibc-rs/modules/src/core/ics04_channel/handler/verify.rs:43:53
stack backtrace:
   0: rust_begin_unwind
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
   2: core::panicking::panic
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:50:5
   3: core::option::Option<T>::unwrap
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/option.rs:746:21
   4: ibc::core::ics04_channel::handler::verify::verify_channel_proofs
             at /home/hussaini/Documents/ibc-rs/modules/src/core/ics04_channel/handler/verify.rs:43:13
   5: ibc::core::ics04_channel::handler::chan_open_ack::process
             at /home/hussaini/Documents/ibc-rs/modules/src/core/ics04_channel/handler/chan_open_ack.rs:72:5
   6: ibc::core::ics04_channel::handler::channel_dispatch
             at /home/hussaini/Documents/ibc-rs/modules/src/core/ics04_channel/handler.rs:58:44
   7: ibc::core::ics26_routing::handler::dispatch
             at /home/hussaini/Documents/ibc-rs/modules/src/core/ics26_routing/handler.rs:84:34
   8: <tendermint_basecoin::app::modules::ibc::Ibc<S> as tendermint_basecoin::app::modules::Module>::deliver
             at ./src/app/modules/ibc.rs:782:15
   9: tendermint_basecoin::app::BaseCoinApp<S>::deliver_msg
             at ./src/app/mod.rs:122:19
  10: <tendermint_basecoin::app::BaseCoinApp<S> as tendermint_abci::application::Application>::deliver_tx
             at ./src/app/mod.rs:262:19
  11: <A as tendermint_abci::application::RequestDispatcher>::handle
             at /home/hussaini/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/tendermint-abci-0.23.1/src/application.rs:132:69
  12: tendermint_abci::server::Server<App>::handle_client
             at /home/hussaini/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/tendermint-abci-0.23.1/src/server.rs:114:28
  13: tendermint_abci::server::Server<App>::spawn_client_handler::{{closure}}
             at /home/hussaini/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/tendermint-abci-0.23.1/src/server.rs:91:39
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Version

v0.9.0

Steps to Reproduce

  • Start basecoin-rs (or a chain that uses our ibc-rs modules)
  • Run -> hermes create channel basecoin-0 ibc-0 --port-a transfer --port-b transfer

Acceptance Criteria

chanOpenAck succeeds without crashing.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@hu55a1n1 hu55a1n1 self-assigned this Dec 6, 2021
@hu55a1n1 hu55a1n1 transferred this issue from informalsystems/hermes Sep 29, 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 a pull request may close this issue.

1 participant