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

Performance issue about websocket of CKB node #4489

Closed Keith-CY closed 3 weeks ago

Keith-CY commented 3 weeks ago

Bug Report

Current Behavior

Recently we have done a test about fee rate estimation. During the test, numerous transactions(40k+) have been submitted onto the chain and the tx pool is full of pending transactions(30k+) according to the RPC get_raw_tx_pool.

Our app subscribes to the CKB node via WebSocket, and pending transactions are expected to be pushed to our end. However, only 3k transactions had been received during the test, and the rest were reached in blocks.

Here's our question, is there a limit on the number of transactions pushed by WebSocket?

Expected Behavior

Most/all pending transactions should be pushed via WebSocket.

Environment

Additional context/Screenshots

The original issue could be found at https://github.com/Magickbase/ckb-explorer-public-issues/issues/704 and a question post could be found at https://talk.nervos.org/t/performance-issue-about-websocket-of-ckb-node/8248

After a brief inquiry, I was led to open a bug report here.

zmcNotafraid commented 3 weeks ago

Code: https://github.com/nervosnetwork/ckb-explorer/blob/develop/lib/websocket.rb

eval-exec commented 3 weeks ago

How is your CPU performance?