nervosnetwork / ckb

The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.
https://www.nervos.org
MIT License
1.14k stars 224 forks source link

[WIP] Add limitation for RPC slow queries #4469

Open chenyukang opened 1 month ago

chenyukang commented 1 month ago

What problem does this PR solve?

Currently, we have some RPC API from indexer such as get_cells, get_transactions, get_cells_capacity which may cost a lot of computing resources, it may occupy all the tokio tasks, and ckb can not response to other RPC APIs.

What is changed and how it works?

This PR try to fix this issue by adding limitation on computing resources for slow queries

What's Changed:

Related changes

Check List

Tests

Side effects

Release note

Title Only: Include only the PR title in the release note.