Ethereum sharding explained! Sharding helps blockchains scale by switching to a proof of stake (PoS) consensus algorithm & using shards to process transactions.
Be sure to subscribe to our channel here:
And feel free to also watch it on YouTube here:
Disclaimer: This is not financial advice. I absolve myself of all responsibility (directly or indirectly) for any damage, loss caused, alleged to be caused by, or in connection with the use of or reliance on any content, goods or services mentioned in this article. As usual, DYOR.
Number 7: What Is Sharding?
Sharding is one of the solutions Ethereum developers and others in the blockchain universe are currently working on, with the general scope of enhancing transaction throughput and scalability. Blockchain sharding basically means splitting the state of the network into shards, or smaller and faster partitions each with their independent state and transaction history. This increases throughput because the transaction volume is distributed and only certain nodes process transactions for certain shards, instead of the entire blockchain carrying all the weight. Splitting the network into smaller working pieces not only increases speed while lowering the size of processed data, but it also allows for a more decentralized system. The challenge is making sure that each shard is secure on its own and capable of reconciling with the others in order to maintain a unified ledger and ensuring the overall integrity of the blockchain. Ethereum developers have tackled implementation from multiple angles and produced solutions that, when tied together, might turn sharded blockchains into a reality.
Number 6: Why was Sharding Considered?
As of this moment, each node on the Ethereum blockchain must process all transactions and store all states. While this model does wonders for security—as each transaction goes through a thorough validation process—it doesn’t do much for scalability. There have been situations such as the Crypto Kitties incident where the increase in transaction volume left Ethereum gasping for air. There's a sort of trilemma at play which states that, so far, a blockchain can only be two of the following: decentralized, secure, or scalable. While decentralization & security have already been successfully achieved, Ethereum developers are looking at sharding as a way of accomplishing the scalability. A sharded blockchain would enable Ethereum to support thousands of transactions per second, thus enabling it to compete with the likes of Visa or MasterCard. Scalability is one of the first obstacles to overcome before all the promises that blockchain technology holds can come to fruition.
Number 5: How Does Ethereum Sharding Work?
The technical process behind a sharded blockchain is rather complex, but the general outline isn’t hard to grasp. Imagine a cable that's made up of many smaller wires. The main Ethereum blockchain is the cable and the shards are the wires. You can also somewhat compare sharding to how a country is split into regions or cities, each governing itself according to a common law. Each shard will be connected to the main Ethereum blockchain and it'll have nodes (called “collators”) that are randomly selected and tasked with creating collations. These structures describe the state of the shard and the transactions that it deals with. Each collation has a “collation header,” which contains signatures from at least two thirds of collators to ensure validity. Headers will also have information identifying the shard that the collation belongs to as well as information regarding the state of the shard before and after the transaction is applied. Collators are similar to miners on other networks. Once a collation is proposed, a random selection of notary nodes checks it and sends it to the beacon. The core of the entire operation is the beacon, which Vitalik Buterin referred to as the “heartbeat” of sharding. It randomly selects collators, keeps time, and manages the flow of transactions to the shards. The beacon will initially have its own chain, but it will eventually be relocated to the Ethereum blockchain. There will also be a protocol in place for cross-shard communication.
Let’s say Jack from shard 3 wants to send 10 ETH to Jill on shard 7. Jack’s balance is reduced by 10 ETH on shard 3 and a receipt is created and stored in a Merkle root. If you’re unfamiliar with Merkle trees, all you need to know for the purpose of this example is that they're structures used to store large amounts of data in the form of cryptographic hashes. The transaction along with the receipt is sent to Shard 7, where it's processed and Jill’s balance is increased by 10 ETH. Shard 7 records the fact that the receipt from shard 3 has been spent, and it creates a new receipt to be used for future transactions.
Number 4: What are Its Advantages?
One of the advantages is that information can securely be processed away from the main blockchain, meaning transactions won’t queue up and clog the blockchain. The main benefit is that throughput is significantly increased since multiple transactions can be executed in parallel. If Ethereum can successfully pull off sharding—essentially solving the scalability issue—without compromising other operational pillars, it would be a major milestone for blockchain technology. The inherent advantage is that blockchain technology in general is given a strong push towards mainstream adoption.
Number 3: What are Its Drawbacks?
One of the main potential drawbacks is that it opens the PoW-based network to attacks in the form of a single-shard takeover, or a 51% attack. This means that an attacker (or group of attackers) can focus their hash power on a single shard and take it over, causing it to produce invalid collations. Since there’s a cross-shard communication protocol in place, other shards also become vulnerable. Transitioning to PoS effectively takes care of the problem through random sampling, meaning attackers won’t know which shard will be assigned to them in advance.
Number 2: How Far Along is Ethereum Sharding?
Vitalik Buterin once stated that “The Ethereum killer is Ethereum,” hinting that there's constant work being done to ensure the platform evolves to match, if not surpass, its competitors. A tweet from April 30th, 2018 from the Ethereum mastermind simply read “Sharding is coming” and included a hyperlink to a GitHub repository were the proof-of-concept to Buterin’s latest sharding solutions can be found. Buterin recently announced that the new development target would be a “minimal sharding protocol.” This would be a raw form of the product that won’t be meant to operate as a full Ethereum implementation. Instead, it'll give developers a chance to use elements of the sharding solution to construct and test infrastructure. As of this recording, Vitalik Buterin’s latest update focused on cross-linking. This is a solution for linking shard chains with the main Ethereum blockchain in a manner that doesn’t hinder collation time.
Number 1: What is Its Future?
For the time being, sharding is in its early stages and its future on Ethereum is also connected with other developments, such as the transition from PoW to PoS. Hybrid Casper FFG (short for “Friendly Finality Gadget”)—also known as Ethereum Improvement Proposal 1011—is the code that'll bridge the transition. In March of 2018, Vitalik Buterin also revealed a scaling solution for Plasma, a smart contract system looking to augment Ethereum’s computational power. I’ve mentioned earlier that scalability is being looked at from different angles and as such, it'll most likely be achieved in three branches that complement one another: Sharding, Casper, and Plasma. The potential for the end result is huge, especially when considering Super-Quadratic Sharding, which is essentially a system created from shards of shards that could theoretically scale to millions of transactions per second.
My video is at DLive