In a previous post, I provided a simple explanation on Ethereum’s Sharding . I also mentioned how Sharding was one of the driving factors for Ethereum’s switch to Proof of Stake consensus model. In this post, I will provide a brief & simple explanation on why Proof Of Work was not the ideal choice for Sharding, and how Proof Of Stake tackles the problems posed by Sharding a blockchain.

Why Shard To Begin With?

Sharding is an initiative to tackle the scalability issues that Ethereum faces. All blockchains are limited by their architecture & design. How? Because every node in the blockchain processes every single transaction. While this enforces a high degree of security/reliability (explained in this post), it also limits the scalability.



Sharding improves the scalability of the Ethereum blockchain by splitting the network into smaller “groups/pieces”.

What’s wrong with PoW?

The Ethereum blockchain currently runs on a Proof Of Work consensus algorithm.

Remember from our post on Consensus Methods , that consensus or “agreement” is achieved by a majority agreeing on the state of the ledger.

Proof of Work essentially relies on hash-power to validate the chain. Blockchain is a trustless system, so we need to dis-incentivise people from being a bad actor. As explained, a bad actor would have to have a majority of the hash-power to manipulate the network. That’s a lot of hash-power. The electricity bill & hardware costs will be monumentally expensive. Hence, in Proof of Work, the hash-power expense makes it cost-prohibitive to be an attacker.

Remember that if we SHARD in PoW, we are breaking up the network into "pieces". Hence, to achieve a “majority” hashpower in a particular shard would suddenly become feasible (since each shard will have only a “piece” of the total hash power”)

Compared to attacking the network, each shard will require only a fraction of the hash-power. An attack is no longer cost-prohibitive.



In fact, if you split the network into 100 pieces, you only need 1% of the total hash-power to takeover a shard. To keep this post simple, I explain how in another post

Validators can collude their hashpower on a single shard, and takeover control of that shard. One way to prevent this attack is to prevent attackers from focussing their hash-power onto a single shard. However, this is difficult/not-possible to do so in a Proof Of Work protocol. In PoW you cannot stop miners from applying their work on a given shard - This is where Proof Of Stake steps in!

Proof Of Stake PoS removes the extrinsic cost of validating the chain: hash power/electricity costs. Here's how: In, Proof Of Stake super-nodes are required to “deposit” (stake) their Ether in order to perform validation functions. Again, remember that:



COLLATORS (TEACHERS-ASSISTANTS): Gather mini-descriptions of transactions & the current state of the shard – and send it up to the node validators .

​

SUPER NODES (PROFESSORS): Collect the data from the Collators. Process the transactions & Validate the blocks.

​ Proof Of Stake – along with this structure – allows Ethereum to do something that it cannot do (easily) in PoW. And that is the ability conduct “random-sampling”. Since Super-Nodes are depositing their Ether, we can use that to randomly assign them to a shard. The assignments are reshuffled regularly as well.



This will ensure that attackers: Cannot choose the Shard they want to work on.

We don’t want them to pick their shard because a small group of attackers can target a single shard to dominate it. Even attackers with a small total-stake can focus their efforts and attack.

Cannot know what shard they will work on ahead of time.

If we don’t reshuffle, an attacker may have enough time to find the other people who have been assigned to his shard. This will allow him to collude with them and attack the shard. We reshuffle regularly to avoid this. Super Nodes are randomly assigned a shard. Not knowing which shard they are assigned to before hand, will prevent them from attacking the system.

Wrapping Up

As you can see, Proof Of Stake makes random-sampling pretty trivial. Sampled validators are reshuffled regularly.



A quote from Vitalik on my previous post:



“ It's really important to mention that validators are super-frequently reshuffled between shards (possibly even once per block), so it's actually quite hard to "target" one specific shard for an attack. This is a large part of where sharding's at least theoretical success in breaking the trilemma comes from.”

Vitalik Buterin

When Vitalik mentions “breaking the trilemma”, he is talking about how typically only 2 out of 3 of the following can be achieved in blockchain:

Security

Scalability

Decentralization

PoS allows for easy sampling & reshuffling which ensures the “Security” of the trilemma – while the sharding structure gives us a level of Scalability and Decentralization. Hence, theoretically breaking the blockchain trilemma. This is a huge feat!

Did you enjoy this post?



Help Us Keep Doing What We Do Best!

Tip Jar 🙂​​

​

BTC: 3LrzDr7ZYQ5xWAKnweM1XuUAvU5YEkF7Zb



ETH: 0x87ba0C08910Dbd3b93D74A2A3b61d78A3C2dbDab