fix: incorrect recv packet query string #149
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue with the receive packet query string on the tendermint chain implementation. The function
recvPacketQuery()
was providing the query tag with therecv_packet
event using thepacket_src_channel
attribute. If it's an received packet, then the source channel is clearly the channel over which the packet was sent from the counterparty chain. However, the counterparty channel is not part of the canonical state of this chain. We need to query attributepacket_dst_channel
to receive the list of packets that where received on this chain.This fixed a problem we had with our setup, where the packet was sent over
channel-1
, then received onchannel-3
. The commandyrly tx acks <path-name>
failed because therecvPacketQuery()
function was called with arguments"channel-3"
and1
(see call arguments in https://github.com/Vsc-blockchain/yui-relayer/blob/2c0d84c67b431b24e0695e425c960e0cba181b75/chains/tendermint/query.go#L309) which ultimately returned 0 transactions in the event query, because on the packet's receipt the eventpacket_recv
was emitted with attributepacket_src_channel='channel-1'
instead ofpacket_src_channel='channel-3'
.