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

fix: incorrect recv packet query string #149

Merged

Conversation

fragwuerdig
Copy link
Contributor

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 the recv_packet event using the packet_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 attribute packet_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 on channel-3. The command yrly tx acks <path-name> failed because the recvPacketQuery() function was called with arguments "channel-3" and 1 (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 event packet_recv was emitted with attribute packet_src_channel='channel-1' instead of packet_src_channel='channel-3'.

@fragwuerdig fragwuerdig requested a review from a team as a code owner November 8, 2024 10:16
@siburu
Copy link
Contributor

siburu commented Nov 8, 2024

@fragwuerdig Thank you for your contribution.
The code is great, but all commits must have a Signed-off-by line for the PR to pass the DCO check.
Could you fix the commit message and rebase your branch?

@fragwuerdig
Copy link
Contributor Author

Oh. Yeah. Sure. Thx for the quick response.

@fragwuerdig fragwuerdig force-pushed the frag/incorrect-recv-query2 branch from ea0fca4 to 29b3e5f Compare November 8, 2024 20:56
@fragwuerdig
Copy link
Contributor Author

@siburu - thank you for your patience. the commit has a signed-off-by line now.

Copy link
Contributor

@siburu siburu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@siburu siburu merged commit c30d155 into hyperledger-labs:main Nov 12, 2024
7 checks passed
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 this pull request may close these issues.

2 participants