Skip to content

Reduce the size of packet acknowledgement queries #3348

Closed
@seanchen1991

Description

Summary

#3334 uncovered an issue where query_packet_acknowledgements returns too much data such that it surpasses the 4MB message decoding limit imposed by the dependency on tonic.

#3335 addressed this by increasing the message decoding limit (and also making it configurable). However, this doesn't address the root cause of the issue, which is that this query shouldn't return this much data in the first place.

The query_packet_acknowledgements query asks the chain to fetch acknowledgements for all sequences in the packet_commitment_sequences list. However, if this list is empty when the query is made, i.e., there is nothing to be relayed, the query returns all packet acknowledgements for the given channel, hence why the query sometimes returns too much data.

Acceptance Criteria

To address the root cause of this issue, the query_packet_acknowledgements query should not return any acknowledgements when the packet_commitment_sequences list is empty. We should also be able to revert the message decoding limit to 4MB, though we should perhaps keep this value configurable.

  • Change query_packet_acknowledgements query should not return any acknowledgements when the packet_commitment_sequences list is empty
  • Revert the message decoding limit back to 4MB

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

A: bugAdmin: something isn't working

Type

No type

Projects

  • Status

    ✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions