paint-brush
If we lived in a Bitcoin future, how big would the blockchain have to be?by@subhan_nadeem
20,907 reads
20,907 reads

If we lived in a Bitcoin future, how big would the blockchain have to be?

by Subhan NadeemDecember 5th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Let’s imagine Bitcoin has accomplished the unthinkable — its become the one true currency used for peer-to-peer payments around the world.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - If we lived in a Bitcoin future, how big would the blockchain have to be?
Subhan Nadeem HackerNoon profile picture

Hint: It’s NOT pretty…

Let’s imagine Bitcoin has accomplished the unthinkable — its become the one true currency used for peer-to-peer payments around the world.

In this Bitcoin Valhalla, let’s imagine that all non-cash payments are conducted with Bitcoin. Instead of credit cards, people whip out their favourite Bitcoin hardware or mobile wallets in coffee shops and hair salons across the world. Just how many of these non-cash payments would there be in this perfect world?

Today, non-cash payments account for approximately 522 billion transactions per year worldwide, and that number seems to be increasing in quadratic fashion, meaning it’ll be a lot bigger by the time we get to Bitcoin Valhalla. There’s no predicting when exactly we’ll get there, so let’s imagine that Bitcoin has taken over as the dominant currency today_._

Where we stand in terms of non-cash transactions across the world , source: worldpaymentsreport.com

Now of course, Bitcoin has to make sure its system can accommodate the enormous number of transactions here without bottlenecking. So let’s dive into the source code and flick the scalability switch that appeared to be there all along — let’s increase the size of the block enough to account for our 522 billion transactions.

Just How Big Should Our Block Be?

Let’s do some napkin math to see just how big our new block is.

522 billion transactions a year translates to 1.4 billion transactions a day.

This is equivalent to 9,722,220 transactions every 10 minutes, which coincides with how often blocks are published to the Bitcoin blockchain.

Assuming transaction sizes stay around the same size, at 250 bytes, this means that every block would hold about 2.4 gigabytes of data_._

This transaction volume would generate about 350 gigabytes on the blockchain every day, or 127 terabytes every year.

For those who don’t know, the blockchain ledger is upheld and propagated by nodes, which are user machines that hold a copy of the current valid Bitcoin blockchain ledger. These nodes all work together to uphold the decentralized blockchain that we’ve come to love. Nodes receive new transactions from users’ wallets, have miners validate them, then receive mined blocks from miners to add to its ledger. The nodes then also immediately propagate these validated blocks out to other nodes across the Bitcoin network.

A visualization of how Bitcoin nodes work in harmony

Today, nodes validate and propagate approximately 1 megabyte blocks to other nodes across the world. According to this analysis about the effects of block validation on memory usage, the process of validating a single block on a node (i.e. serializing and hashing it) consumes about 1.25 gigabytes of memory and takes approximately thirty seconds. The analysis also claims that block validation times scale quadratically, and an eight megabyte block would take approximately 150 minutes to validate. However, given only two datapoints, and for simplicity’s sake, let’s assume validation time and memory consumption scale only linearly.

This is what the scale of block validation might look like if Bitcoin took over the world today, with 2.4GB blocks

Extrapolating to fit our newfound monster blocks, we’re looking at a validation time of over 51,000 minutes per block, or approximately 35.4 days! It would take over a month for a node running current-day consumer-grade hardware to validate any block that it receives. On top of that, memory consumption per block validation runs in the range of 3 terabytes. The only machine that seems to come even close to that level of memory (outside of server racks) is the unreleased HP Z8 that will cost well over $10,000 at launch.

Optimizations may be made (for example, block validation is not done in parallel) and we can expect CPU power to continue growing, so a validation time of 30+ days is probably an unrealistic assumption. But will processing power scale enough?

This machine would also need to store the 127 terabytes of data generated every year. With the cost of storage hovering at 1.9 cents per gigabyte, this machine’s operator would need to spend approximately $2,413 per year on storage costs to keep up with the blockchain’s growth!

In comparison, the blockchain today produces about 50GB of data every year, which amounts to around $0.95 in yearly costs.

Right away, this entire thing is starting to look absolutely ridiculous, but bear with me for a little while longer.

Bandwidth for our Blocks

So our nodes also need the ability to both download these blocks from nodes, and then transmit them to other nodes. Let’s have a look at the current distribution of nodes across the world.

source: https://bitnodes.earn.com/

It should be noted that according to the Bitcoin Wiki, there are up to 15 times as many nodes (150,000+) that are not shown in distribution charts such as the one above, mainly due to port configurations, but again, let’s keep things simple and assume the given distribution is an accurate one. Let’s assume our node has to download a block every 10 minutes, and uploads the minimum 144 blocks per day recommended by Bitcoin Node guidelines. This comes out to over 691 GB of bandwidth everyday, or 20.73 terabytes per month.

Let’s look at bandwidth costs in the United States, where the largest distribution of nodes reside. Since no consumer grade network could feasibly provide that level of bandwidth, I had to resort to a handy CDN aggregator to see what our connectivity options were.

source: www.cdncalc.com

We’re assuming that fiber networks are prevalent enough for speed to not be an issue. The absolute lowest price a single node operator in the United States could pay to propagate Bitcoin blocks would be $600/month.

So let’s recap. If Bitcoin took over the world today, a single Bitcoin node operator in the United States:

  • would have to purchase a machine capable of providing 3TB of memory, that would probably cost well above $10,000
  • would need $2,413 per year in order to store the blockchain on the machine
  • would have to route blocks through a CDN operator that would cost over $600 per month. Gone are the days of Google Fiber and AT&T**!**
  • would face block validation times of up to one month per block. So our node might not be doing much of anything at all.

All of this, just to run a single Bitcoin node.

It doesn’t look like the 150,000+ nodes running today will be able to stick around long enough to see our Bitcoin Valhalla. Instead, they will be priced out and replaced by monopolized and centralized entities with enough financial power to maintain server racks that can handle hundreds of billions of consumer transactions per year. Wait a minute, this sounds suspiciously like Visa, MasterCard, and the modern banking system!

I wrote this article for myself more than anything, in order to visualize and understand how drastic the impact of a large-block-size blockchain scaled to meet the needs of our society would be. This is not a formal analysis and shouldn’t be treated as such. However, this extreme Bitcoin endgame does highlight why we shouldn’t let the block size get out of hand.

If nothing but massive corporations are left to uphold the few full Bitcoin nodes in our society, Bitcoin consensus rules go out the window, and the security of the network almost solely lies in their hands. In that case, Bitcoin will no longer be the trustless peer-to-peer network it was meant to be and you might as well go back to paying your monthly credit card statement.

There are also some holes in my napkin math. For example, by the time Bitcoin reaches this level of adoption, the cost of technology will have dropped and won’t be as insane as I previously outlined. There will also probably be unforeseen progressions in blockchain technology that could offset the impact of the increased block size.

Do note that I only accounted for non-cash payments — cash payments still take up the majority of transactions in the world and open up a whole other dimension of non-scalability. Also note that if a node is hit with a malicious invalid block, it will waste an increasingly excessive amount of time trying to validate it.

Non-cash payments are also rapidly increasing every year, so hardware usage will also be undoubtedly higher once we near this level of Bitcoin usage.

Past these holes in my proverbial napkin, here is the central message all of this is meant to convey:

At the end of the day, the beauty of running a Bitcoin node is in the sheer simplicity of it. You or I could run a Bitcoin node on our computers right now, provided we have the hard drive space for it. A Bitcoin node can be run on a $90 Raspberry Pi or on a $20/month EC2 instance. This simplicity is the reason why there are probably over 150,000 nodes in the world, and why Bitcoin continues to function seamlessly as a trustless peer-to-peer network.

Palm-sized Bitcoin nodes — they exist! source: bitseed.org

If Bitcoin usage starts to get even remotely closely to the numbers I’ve outlined, the ability to uphold the Bitcoin network will quickly slip outside of the hands of users and into the hands of centralized entities.

All of this is also not to say that Bitcoin is unable to scale. Bitcoin can and will scale to meet the demands of billions. And it can do so without having to bloat the blockchain! There are several innovative solutions in the works that aim to scale the Bitcoin network elegantly over the long-term without having to increase the block size, the most important of which I’ve outlined in my recent in-depth article here.

These solutions are intricate and take time to develop which is why we’re not seeing immediate results, but as the old Toy Story adage goes, “You can’t rush art.”

I encourage readers to try setting up a Bitcoin Node today. Go ahead and see how easy it is!

Make sure you remember how easy it is, because that is exactly what keeps Bitcoin alive.

UPDATE: I’m receiving a lot of feedback (which is fantastic) regarding the fact that the price of technology will drop and so these numbers are not as much of a concern. This is a valid point and I highlighted as much in my conclusion.

However, Bitcoin is being adopted rapidly and if you are betting on Bitcoin to reach mainstream adoption as fast as possible, you are also betting on the cost of technology to drop even faster. I personally don’t want to make that bet.

I’m not advocating restricting hardware consumption to the point where nodes still need to run on Raspberry Pis. But at what point in time is it reasonable to expect users (or even miners) to house machines with numbers even remotely closely to the ones outlined above? Storage prices are stagnating. Moore’s Law is struggling to stay alive.

I also didn’t touch upon the impact this level of chain scaling would have on miners. Even if you believe non-mining nodes are not a necessity, with the given hardware scale required, many miners will be similarly priced out and mining centralization will be probably be promoted. What’s the difference between trusting a minuscule number of near-billion-dollar mining pools securing the network and VISA’s server racks?

If you’re interested in more in-depth and informative write-ups like these in the future, I recommend following me here on Medium and on Twitter!

If you have any feedback or if you’ve noticed any mistakes I’ve made, please don’t hesitate to let me know in the comments or in a private note!

If you want to learn more about Bitcoin nodes, the Bitcoin wiki is a great place to start.

BTC Address: 3MGguJhw1bm95tDQjZ3b8ySBwZLJ77CgG1

I also realize that SPV is sufficient for most users — this is true! But full nodes are still a necessity to ensure decentralization and consensus. We should be encouraging their use, not moving towards dissuading them.

A great piece further explaining the importance of Bitcoin’s design:

Blockchain, Money, and Social Scalability by Nick Szabo