You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MsgAcknowledment is sometimes rejected in a 3 chain setup when sent by the CLI (works from the relayer loop). The issue appears on a chain with multiple channels with different counterparty chains but with same counterparty port and channel-id.
Many thanks to @vitorenesduarte for finding this. Here are his notes:
Description
Before, a query_txs for a packet on a given chain would filter only by the packet source port, source channel and sequence.
With 2 chains, there can be at most a single packet matching such filter, and this fact was assumed in the code.
However, this assumption does not hold with more than 2 chains. To understand why, consider the following example with chains ibc-0, ibc-1 and ibc-2:
a channel handshake occurs between ibc-0 and ibc-1; the channel identifiers are channel-0 on both ends
a channel handshake occurs between ibc-1 and ibc-2; the channel identifier on ibc-1 is channel-1 and on ibc-2 is channel-0
If now both ibc-0 and ibc-2 send packets to ibc-1 and we do a packet query filtering only by the source, such query will return
packets from both ibc-0 and ibc-1 (as both have channel-0 as the source channel in their packets).
In this commit, we start filtering also by the destination port and destination channel. This makes the packet query unambiguous.
Thanks @ancazamfir for the help debugging this issue. It was a fun one!
Crate
relayer
Summary of Bug
MsgAcknowledment
is sometimes rejected in a 3 chain setup when sent by the CLI (works from the relayer loop). The issue appears on a chain with multiple channels with different counterparty chains but with same counterparty port and channel-id.Many thanks to @vitorenesduarte for finding this. Here are his notes:
Description
Before, a
query_txs
for a packet on a given chain would filter only by the packet source port, source channel and sequence.With 2 chains, there can be at most a single packet matching such filter, and this fact was assumed in the code.
However, this assumption does not hold with more than 2 chains. To understand why, consider the following example with chains
ibc-0
,ibc-1
andibc-2
:ibc-0
andibc-1
; the channel identifiers arechannel-0
on both endsibc-1
andibc-2
; the channel identifier onibc-1
ischannel-1
and onibc-2
ischannel-0
If now both
ibc-0
andibc-2
send packets toibc-1
and we do a packet query filtering only by the source, such query will returnpackets from both
ibc-0
andibc-1
(as both havechannel-0
as the source channel in their packets).In this commit, we start filtering also by the destination port and destination channel. This makes the packet query unambiguous.
Thanks @ancazamfir for the help debugging this issue. It was a fun one!
Version
1f2e72d
Steps to Reproduce
For Admin Use
The text was updated successfully, but these errors were encountered: