Warming Up the Scaling Test Network for Bitcoin SV – 24 hours of Sustained 64 MB Blocks
The Bitcoin SV network is committed to massive on-chain scaling, and nChain’s team is progressing with technical work needed to achieve this Satoshi Vision. In fact, our recent tests have demonstrated the Bitcoin SV network’s capacity to handle sustained 64 MB blocks over a full 24 hour period, and we are already moving towards showing sustained 128 MB blocks. Here’s a quick update on what we are doing, and what is coming for the future.
Sustained Big Blocks on BSV Scaling Test Network
In September 2018 nChain built its own version of the former Gigablock Test Network to research Bitcoin scalability. The new Scaling Test Network (STN) is designed to be a permanent public test network with regular and consistent large volumes of transactions. The next release of the Bitcoin SV Node implementation will support the STN in the same way as the testnet and regtest networks.
nChain and the Satoshi Shotgun (Professional Stress Test) team began collaborating on the STN in December 2018, starting with a “warm up”. We updated the network, implemented a performance monitoring and analytics system, and extended the Satoshi Shotgun to support the STN. Once this was done, we began steadily ramping up the volume of transactions.
We have seen large blocks (64, 65 and even 103 MB) mined on the BSV live network. While those are impressive, we know that true success is showing that BSV can sustain large blocks of that and much bigger size for long periods. The STN is designed to support research into the throughput capacity of the Bitcoin network. Our focus over the last month has been on transaction propagation. That means we have specialized systems, such as the Satoshi Shotgun, produce transactions and deliver them to a non-mining node. The transactions then propagate across the STN, are received by mining nodes, and are mined into blocks. The aim is to have a reasonably realistic model of the public Bitcoin SV network. We will be adjusting this model as needs and focus change.
What have we seen? Well, sustained 64MB blocks – over a full 24 hour period – with the latest development build of Bitcoin SV are easy. That’s 270 transactions per second, sustained, continuously for a full 24 hour period. Our tests did this over a 24 hour period with no problem.
Sustained 128MB blocks? Yup.
A bit more difficult than 64MB but we’re getting there for sustained 128MB blocks.
Improving Transaction Propagation
Block size achievements are important, but it’s critical to measure specific behaviour in the node. During our research, we confirmed that transaction propagation is one of the key factors that is limiting the capability to produce big blocks. This is unsurprising and was expected but it’s important to confirm theories and suspicions with measurements and data. We added a specific metric called txninvsize, this is the number of transactions that are queued to be included in inventory messages to a peer. It’s the mechanism that the node uses to inform other nodes about transactions so that they can be propagated.
This graph is from a mining node. You can see that occasionally 1000 transactions are queued for notification to other nodes but these are exceptions, the queue gets quickly cleared. This is a specific function that we have improved in the next version of the Bitcoin SV Node implementation. Prior to this change, we were seeing queues of between 600,000 and 800,000 transactions build up during stress tests. If a node can’t inform other nodes about the transactions it has, those transactions just don’t get propagated.
That change also addressed CPU use by the P2P networking, spreading the load out across multiple cores. The graph below shows the load on that mining node during the same period.
What’s interesting here are the peaks, reaching regularly above 1.2 and touching 1.4. Load is measured in terms of cores, so 1 is equivalent to one core being fully occupied. In this graph, we can see the P2P networking code starting to spread out over other cores. Prior to this update, we never saw the load above 1. There’s still a long way to go with making Bitcoin truly multi-processing but this is a great start.
No measurement system would be complete without measuring the performance of individual cores. This dashboard is not very useful at this resolution, it’s just here to give an idea of the kind of metrics we are gathering.
It’s also useful to look at the problems. Here is a graph of the mempool size of an under-provisioned node. You see the sharp drops in the graph, this is where the system runs out of memory and terminates the bitcoin process. Bitcoin starts up again, loads up the mempool, and then fails again.
One area of concern is collecting the metrics. In the graph below you can see several gaps in the data, this is caused by timeout’s when collecting the data. We will hopefully be addressing this in a future version of the Bitcoin SV Node implementation.
The STN provides an invaluable resource for evaluating the performance of the Bitcoin SV software with large transaction volumes. We have used it extensively to confirm theories and evaluate our improvements to the Bitcoin SV Node implementation and we will continue to extend it. What we have learned has not only helped the Bitcoin SV Node team to get to this point but has helped outline a clear roadmap for more short term scaling gains.
Next Steps on the Scaling Journey
With these test results in hand, what’s next?
We are now starting to contact BSV miners and development teams and inviting them to participate in testing on the BSV STN, to make use of this opportunity to evaluate their systems performance and capacity to deal with a high transaction throughput network. For the ecosystem at large, it is important that ALL infrastructure services, not just mining nodes, are properly load tested to ensure uninterrupted service during peak load periods.
Our goal is to eventually have every ecosystem participant running a test instance of their product on STN – including wallets providers, exchanges, block explorers, BitDBs and more. With the next release of Bitcoin SV, planned for 11 February 2019, this network will be public and available to everyone.
After that, we plan to conduct a public stress test on the BSV mainnet. We will work with the Satoshi Shotgun team to do another Professional Stress Test of BSV, and see how sustained periods of large blocks perform on BSV in real life. This is just another step in our scaling journey for BSV. One day, we want to look back and see how small 64 and 128MB blocks truly are in the Satoshi Vision for Bitcoin.
Bitcoin SV Lead Developer