[Bug]: Setting the value of query-gas-limit does not impose any restrictions on the tx composite query #20859
Open
Description
opened on Jul 3, 2024
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
- 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.
- 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
- 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.
Ask
- Why setting 'query-gas-limit' cannot restrict tx composite queries?
- 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
Metadata
Assignees
Type
Projects
Status
📋 Backlog
Activity