Limits to Blockchain Scalability vs. Holochain
By: Arthur Brock
Tags: Dapps, Holochain, Elon Musk, Blockchain, Dogecoin

Vitalik Buterin, founder and designer of Ethereum, recently responded to a tweet by Elon Musk about increasing the block size and block times of DogeCoin by 10x and lowering the fees by 100x with a bit of a lecture on the limits of blockchain scalability.

I appreciate that Vitalik is taking this issue public and so I thought this might be a good time to wade into the fray to look at these issues from a Holochain context. Much of what they want suggests a Holochain solution. I’m going to use Vitalik’s talking points from this article and his post on Trust Models to see if we can sort out some of these scalability issues from a different perspective.

Vitalik begins by writing:

Just how far can you push the scalability of a blockchain? Can you really, as Elon Musk wishes, “speed up block time 10X, increase block size 10X & drop fee 100X” without leading to extreme centralization and compromising the fundamental properties that make a blockchain what it is? ….As it turns out, there are important and quite subtle technical factors that limit blockchain scaling, both with sharding and without.

I know this may spoil the punch line, but I want to underscore the difference: Holochain doesn’t have the scalability problems of blockchain. Blockchain’s scaling problems are mostly related to managing large scale consensus. We’re demonstrating with Holochain that you don’t need consensus to maintain data integrity in distributed apps or currencies.

Regular users must be able to run a node

Vitalik illustrates how miners or stakers in a blockchain network can collude (putting together a super-majority of consensus nodes) to pull off an arbitrary attack, such as depositing 4.5 billion units of previously non-existent currency into an account of their choosing.

The only reliable way to make this kind of coordinated social attack not effective is through passive defense from the one constituency that actually is decentralized: the users. …more nodes good, fewer nodes bad, and we definitely need more than a few dozen or few hundred.

I like how he subtly acknowledges that mining and staking is not actually decentralized. As I’ve highlighted before, blockchain is caught in a feedback loop of increasing centralization. Any “decentralized” system using Proof-of-Work or Proof-of-Stake will eventually centralize power, wealth, and control. In fact, if you’re really on the edge of what’s possible in distributed systems, you realize that any approach to consensus is a type of centralization. With Holochain’s architectural innovations, it is still possible to manage distributed data integrity without eliminating differences in perspectives.

Vitalik then cites a tweet which basically says: You defend against malicious changes by having users do validation.

That is exactly how Holochain works.

In Holochain, there are no miners or stakers. In fact, we don’t need a built-in currency token which all blockchains need so they can pay people to run them, because they’re so inefficient. When using a Holochain app, users host themselves. They literally point their web browser to`localhost` to use the app. Some of the data that users need is hosted locally, and Holochain provides the distributed data integrity engine which retrieves whatever other data they need from the users who are holding it.

How much work can we require full nodes to do?

Most people know that running full nodes on blockchain requires A LOT of work in terms of CPU/GPU, bandwidth, and storage. Vitalik has some strategies to lower the amount of work in Ethereum 2.0 by switching from mining to staking, and even running 64 shards under a main chain. But the question remains, will it be feasible to have normal users run full nodes? Even on their phones?

The bullet points below summarize Vitalik’s suggestions for what normal users could do on their machines or phones, followed by my response:

Computing Power: ~5–10% of CPU power can be spent on block verification. [Maybe this is okay if you’re plugged in, but this would suck down your phone battery pretty darn quickly. But, is this percentage usage of a single core? Or, is he thinking if I’ve got 8 cores I’m going to keep one pegged to 100% just for Ethereum?]

~5–10% of CPU power can be spent on block verification. [Maybe this is okay if you’re plugged in, but this would suck down your phone battery pretty darn quickly. But, is this percentage usage of a single core? Or, is he thinking if I’ve got 8 cores I’m going to keep one pegged to 100% just for Ethereum?] Bandwidth: maybe we can handle 1–5 MB blocks every 12 seconds. [That’s about 400 Gb per day. If I exceed 15 GB in a month, my cell phone plan drops me to 2G data speeds. Cellular “unlimited” plans are not actually unlimited — this overshoots them all. These usage levels could even get you flagged for abuse on home Internet providers. I hope you don’t also expect to watch Netflix.]

maybe we can handle 1–5 MB blocks every 12 seconds. [That’s about 400 Gb per day. If I exceed 15 GB in a month, my cell phone plan drops me to 2G data speeds. Cellular “unlimited” plans are not actually unlimited — this overshoots them all. These usage levels could even get you flagged for abuse on home Internet providers. I hope you don’t also expect to watch Netflix.] Storage: 512 gigabytes [Phones and tablets don’t typically have this much storage. I’ve been running my laptop with a 512 GB SSD drive, so apparently 100% of it should be dedicated to Ethereum.]

While the figures he suggests are considerably lower than running an Ethereum mining rig with 8 GPU cards which you can use to heat your home, it still seems a pretty big stretch for normal users on phones, tablets or laptops. No other software you use requires this from you. It seems especially unreasonable when you consider how little daily utility most people get from any dApps on Ethereum. To expect me to dedicate this much of my computing resources to Ethereum just to keep it working properly when I make fewer than a couple transactions a month seems pretty crazy.

How much work is required from users on Holochain?

On Holochain, users only run the apps they actually USE. This makes sense. If I just want to run a Twitter-like app, why should I also have to run your crypto exchange, gambling app or collectable cartoon animals?

This is the first level of sharding that happens on Holochain. Instead of a monolithic blockchain like Ethereum where every dApp and transaction happen on one chain, every Holochain app is a separate encrypted peer-to-peer network which only coordinates with the other users of that app. By design, it cannot communicate with other apps over the network. If you want to connect data flows between apps, you bridge them locally by running both apps locally.

Even this first level of sharding tends to freak out blockchain people who think that the security of the network relies on the number of nodes on the network, so you must maximize the total number of nodes. However, this is only a problem if the system is vulnerable to majority consensus attacks.

Lower trust requires less work and provides greater security

In his post about Trust Models, Vitalik acknowledges that there are different strategies and levels of assurance possible for providing validation in decentralized networks. The most efficient and secure approach is to have to trust the least number of nodes to behave properly.

This is my variant of the graph Vitalik posted in Trust Models

Blockchain requires a majority of nodes to behave honestly (N/2 of N). But when you use a Holochain app, you already have the validation rules for the app running locally. This means for some things you don’t need to trust anyone else, because you can validate things for yourself (0 of N). However, sometimes you pull data from the network trusting others have validated it (1 of N).

In Holochain, we achieve 1 of N because it only takes one honest node to detect improper data which fails to validate. They then trigger Holochain’s immune system and circulate a “warrant” containing the cheater’s cryptographically signed actions as proof of their cheating. Then any and all honest nodes will block the cheater and disregard the cheating action.

This lower trust threshold actually enables a second level of sharding so that even within a single app nobody needs to hold all of the app’s data. Holochain focuses on how many copies of data need to be available online (e.g. 50 copies), which determines approximately how many nodes need to validate, store, and serve that piece of data.

Holochain’s DHT (distributed hash table) randomizes which nodes validate each piece of data by routing it to the nodes whose network address is nearest to the hash address of the data being validated. The workload is distributed fairly across all users, ensuring the resilience of the data in the shared storage space.

Looking at a real-world scale dApp: Twitter on Holochain

Let’s use an example of running Twitter at its real activity levels of about 330 million active users tweeting 1.1 times per day (which is far too much activity for the Ethereum blockchain to handle, even if all its power was devoted to only this one app). If we’re targeting 50 live copies of data in the DHT, then that means I’ll need to store and validate about 55 tweets per day (50 * 1.1) — once every 26 minutes.

So how does that translate to workload if built on Holochain?

Computing Power: 0.00008% — every 26 minutes I’d use about 1 millisecond of CPU time from one of the 8 cpu cores on my phone to validate a new tweet. However, there’s also regular gossip with other nodes, but usually your device will discover there’s no new data to validate. So we could even take it up another decimal place or two just from the overhead of making network connections. Let’s be safe and say it could take up to 0.002% of your computing power. (~ 1/50,000th of what Vitalik proposed)

0.00008% — every 26 minutes I’d use about 1 millisecond of CPU time from one of the 8 cpu cores on my phone to validate a new tweet. However, there’s also regular gossip with other nodes, but usually your device will discover there’s no new data to validate. So we could even take it up another decimal place or two just from the overhead of making network connections. Let’s be safe and say it could take up to 0.002% of your computing power. (~ 1/50,000th of what Vitalik proposed) Bandwidth: Tweets are small, most of the bandwidth usage would come from checking in every few minutes with peers to see if there’s new data. And in terms of serving those tweets, remember, I’m only one of 50 validators. So, I’d have to provide about 1/50th of the workload of serving these tweets. At 707 average followers, ½ of which may pull it into their feed, that’s 707/50/2 or about 8 times a day to serve each of the 55 tweets. Serving 440 tweets = 225 MB per day plus approximately 1 GB per day for gossip. (~ 1/400th of what Vitalik proposed)

Tweets are small, most of the bandwidth usage would come from checking in every few minutes with peers to see if there’s new data. And in terms of serving those tweets, remember, I’m only one of 50 validators. So, I’d have to provide about 1/50th of the workload of serving these tweets. At 707 average followers, ½ of which may pull it into their feed, that’s 707/50/2 or about 8 times a day to serve each of the 55 tweets. Serving 440 tweets = 225 MB per day plus approximately 1 GB per day for gossip. (~ 1/400th of what Vitalik proposed) Storage: 55 tweets per day, plus some links, means after a year you’d be storing less than 20 GB of data. (~ 1/50th of what Vitalik proposed)

Therefore hosting a Holochain Twitter app (with activity levels about 6 times the throughput and capacity of the whole Ethereum Blockchain) takes a mere fraction of the resources Vitalik is proposing that users provide for free to keep Ethereum safe. Holochain is immune to majority attacks, and doesn’t require anyone to pay gas fees, because it is completely self-hosted.

Could Holochain really take this mainstream?

It is worth noting that it would probably take years to get all of Twitter’s users to migrate over to Holochain to host themselves, even if Twitter switched their infrastructure to this kind of decentralized architecture. This is where the Holo hosting framework comes in.

Holo enables Holochain apps, that would normally be self-hosted, to be served to a web user from a peer hosting network. In other words, if your users just expect to open their browser, type in a web address, and have access to your app, you may need to provide them with a hosted version.

Holo has a currency which pays hosts for the hosting power they provide for Holochain apps that still need to serve mainstream web users. So instead of paying Amazon or Google to host your app, you pay a network of peer hosting providers in the HoloFuel cryptocurrency.

Instead of gas fees costing over 1 billion times what it would cost to host on Amazon (as it does on Ethereum), we expect Holo hosting to have more competitive pricing to current cloud providers because of the low demand on system resources as outlined above.

Join the Holo hosting network at https://holo.host

Conclusion

Even Vitalik recognizes there are serious limitations to scaling blockchains, and that blockchains need their only truly distributed stakeholders to police miners and stakers to prevent arbitrary attacks. Yet if blockchains are too inefficient to realistically expect users to devote that much computing power (without receiving gas fees), then why are people still hyping blockchain?

Elon, I’m sorry that our logo isn’t a dog… but if you’re looking for a crypto solution that actually scales, you’ve got to move on from blockchain and start looking at Holochain.