nervosnetwork / ckb

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

Use standalone runtime for RPC service #4459

Closed chenyukang closed 3 months ago

chenyukang commented 4 months 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 process blocks in extreme scenarios.

What is changed and how it works?

RPC will run in a standalone tokio runtime, so that we can process block even in extreme scenario.

Check List

Tests

Side effects

Release note

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