Bitcoin SV Mainnet Stress Test Report (English Translation)
On April 18, 2019, we had conducted a third round stress test based on TPS (Transaction Per Second) against BSV mainnet with the support from Chinese Bitcoin SV community.
BSV mainnet sustained peak throughput of 200 TPS and 400 TPS in the previous tests so we set the target at 1000 TPS this time. The test result showed there was no loss of transactions which had all been included in blocks and there were no double spends. However, block re-org occurred and 1000 TPS target couldn’t be reached while parallel verification code hadn’t been deployed in nodes.
Testing tools and this report are completed by Monkeylord and me (Aaron67).
nChain hadn’t been notified in advanced intentionally so the test was conducted in an abrupt manner in order to find issues without any preparation. We couldn’t predict the impacts on the network under 1000 TPS and apologise for some interruptions brought to the overall network service.
First Stress Test:
Conducted by the initial version of testing tool. 20TPS sustained, no issue found.
Second Stress Test:
Modified and improved testing tool and succeeded with multi testing scenarios under full condition. 200 TPS sustained and no issue found. Mempool had been cleared every time when a block was created. Load of 400TPS was followed however the test only lasted within a minute due to running out of BSV. No issue was found.
Servers: 32 core 64 G ram VPS, located in Singapore
Stress test tool single run Benchmark: 6–10 TPS
2. Testing Details:
Throughput: 1000 TPS
Total Transactions: 1,100,000 approximately
Please see 《Bitcoin SV 区块重组事件始末》
Impact on Related Services:
1. Blockchair, at TPS 440, service didn’t sustained and halted totally after a while.
2. WhatsOnChain, service uninterrupted and new blocks were displayed for both competing chains within a reasonable time. However, page refresh was rather slow
3. Bsv.btc.com, not fully interrupted but response time was very slow
4. Bitdb, service collapsed when re-org happened
All blockchain explorers resumed normal service after 22:00
Huobi, announced pause of BSV deposit and withdrawal soon after the first re-org
Based on Mempool mining pool’s feedback, mempool (transaction) synchronisation experienced high latency within its network.
3. Test Result Analysis:
Re-org and Impact on Verification Node:
According to a test on ECDSA signing, a single core personal computer’s signing speed is around 300–400 TPS, so a verification node’s signature verification speed shouldn’t exceed 300–400 TPS per core.
Node will verify transactions after receiving a new block. The number of transactions reached 400,000 in the biggest block during this stress test. It posted a huge challenge to node’s capability of verifying big blocks. If a node runs a single core, it could take several minutes and created a window for chain split.
On block 578640, both SVPool and CoinGeek mined a 52 m and 35 m block. Both pools continued to mine on their own chain until the second re-org occurred. All verification node needed to re-verify hundreds of thousands transactions on each re-org. Please see below Exhibit 1 for mempool details when first re-org occurred.
The re-org caused re-verification of transactions in massive volume across all verification nodes. We think this is the main reason triggering collapse of services.
Old code of Transaction Verification:
Most of the BSV nodes haven’t deployed parallel verification and they still run on codes inherited from BCH’s transaction verification code which is not very efficient. These codes can’t fully utilize the hardware nor run in clusters for parallel. This implementation originated from BTC. Since BTC only needs to process 1M block, it won’t cause any issue for BTC but not the case for big blocks.
The verification limitation from mining pools is the main contributor of the observed bottleneck during the stress test.
After talking to mining pool operators, we found the interconnections among mining nodes were in good condition and no issue found when propagating big blocks.
When stressing at 1000 TPS level, BSV network’s main bottleneck lies in the lack of transaction verification speed. Two re-orgs amplified the effect and caused some service went down such as explores and exchanges.
According to bitcoinsv.io’s updates, there will be new release for Bitcoin SV client to improvement performance
Original report in Chinese: