Skip to content

[Bug]: Setting the value of query-gas-limit does not impose any restrictions on the tx composite query #20859

Open

Description

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

I am currently facing a problem where I call tx to query data, but when the amount of data involved in the query is large, it will cause the memory of the node program to increase continuously, leading to the use of machine resources and abnormal node exit.
My solution is to modify the value of the 'query-gas-limit' parameter in the configuration file 'app.toml' and set it to a reasonable value of 200000. But it doesn't appear to limit tx composite queries.

Query background and examples

  1. Background: The current blockchain has a block height of approximately 550000 blocks and a transaction volume of tens of millions of transactions. and the queried nodes have set the 'query-gas-limit' parameter, which is 200000.
  2. Query: Query all transactions with block height greater than 450000 blocks (with a large number of transactions), and want to restrict the query through the 'query-gas-limit' parameter. The interface for querying data is: /cosmos/tx/v1beta1/txs?order_by=ORDER_BY_DESC&query=tx.height>450000
  3. Result: The 'query-gas-limit' parameters did not take effect and the interface was still requesting. The request was manually stopped, but the chain node program did not stop querying data internally and the memory was constantly increasing.
截屏2024-07-03 18 41 55

Ask

  1. Why setting 'query-gas-limit' cannot restrict tx composite queries?
  2. What is a good way to solve the problem of too large tx request data?

Cosmos SDK Version

v0.50.6

How to reproduce?

No response

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions