bsc icon indicating copy to clipboard operation
bsc copied to clipboard

BSC self-built node CPU surge

Open lijie9703 opened this issue 2 years ago • 1 comments

I have synchronized a BSC full node, but recently the CPU has often soared suddenly, and finally I found out that the reason is because when I scan transactions on the chain, I need to query the transaction receipt information of each transaction on the chain. Occasionally, there are thousands of transactions in the BSC chain, which will cause the resource usage of my BSC node to increase.

Two questions need to be asked:

  1. Why are there occasional blocks with thousands of transactions in BSC nodes?
  2. How to solve the problem of CPU increase when traversing blocks of thousands of transactions.

lijie9703 avatar Oct 31 '22 01:10 lijie9703

  1. Generally at the time of new erc20 token launching, in order to buy the new token, there will be lots of txs sent from robots. These robots sent tens of thousands of txs to buy a fixed amount of new token, but by the contract for only one transaction can be successful. So a block could hold thousands of transactions since most of them executed on failure, only costing little gas

  2. using websocket

cosinlink avatar Oct 31 '22 03:10 cosinlink

closing due to inactivity

bnb-tw avatar Jul 05 '23 02:07 bnb-tw