Closed stana-miric closed 2 years ago
The problem here is that only ChannelOpenInit is called, and transfer channel stays in INIT state (the handshake is never completed).
A relayer should complete the handshake.
The ibcTransferKeeper.SendTransfer
will not fail even if the channel is not OPEN yet (due to optimistic sends). However, the packets cannot be received by the destination chain before the channel is OPEN, see https://github.com/cosmos/ibc-go/blob/05c4bfbbebb20d1cc078ddf1d29dadc766d9251b/modules/core/04-channel/keeper/packet.go#L148
We got error in this line, and after debugging saw that destinationPort is not set, and later when it try to send packet it fails the basic validation because the counterparty port is not set. Also, we saw that the channel state at that moment was init.
Is there a way to ensure that relayer will finish the handshake, because in our case this does not happen? Should we call something on relayer explicitly, except creating a connection between consumer and provider chains and opening a channel between provider and consumer ports?
To make it easier, we should assume that optimistic sends are not supported. This means that we should check here whether the transfer channel is open. If it's not, just exit the function.
Closed by https://github.com/cosmos/interchain-security/pull/322, right @stana-ethernal ?
Closed by #322, right @stana-ethernal ?
yes
During opening a channel between consumer and provider, in the consumer module in OnChanOpenAck function there is a code for initialization of a transfer channel used for the rewards that should be sent to the provider chain. The problem here is that only ChannelOpenInit is called, and transfer channel stays in INIT state (the handshake is never completed). The consumer module uses this channel to send a reward to the provider chain, but an error occurs with the following message: "packet failed basic validation: invalid destination channel ID: identifier cannot be blank: invalid identifier" This causes consumer chain halting.