A Simple Explanation of Two Complex Terms for Scaling Ethereum: Sharding and Danksharding
Table of Contents
Imagine a Bad Day Scenario
Today was a bad day because the attendance system recorded you as being ten minutes late to work again. This month, you’ve been late a total of twenty days.
The reason? The building you work in has only one elevator, and your office is on the tenth floor. Waiting in line, waiting for the elevator, and being late is unavoidable.
A solution everyone suggests is moving to a new building with more elevators (since no one wants to wake up earlier).
Ethereum’s Problem
The Ethereum blockchain
faces a similar issue: too many transactions need to be processed (like people lining up for the elevator), but the network infrastructure has limitations (only one elevator), causing slow transaction processing and high gas fees (everyone waiting and wasting time to get into the elevator).
Sharding as a Solution
Sharding is a proposed solution to this problem by dividing the workload on the main blockchain (called the Beacon Chain) into smaller chains called “shards.”
Just like moving to a building with more elevators reduces waiting time, sharding splits the transaction load across multiple smaller chains, making the network more efficient and scalable. Each shard can process transactions independently, so the overall capacity of the network increases, similar to how multiple elevators can transport more people simultaneously without long waits.
Danksharding
Danksharding is an advanced version of sharding, specifically designed to further optimize and enhance the efficiency and scalability of the Ethereum network. While sharding distributes the workload, Danksharding introduces additional improvements and techniques to make the process even more seamless and effective.
By implementing sharding and Danksharding, Ethereum aims to handle more transactions at a faster rate and lower cost, much like having multiple elevators in a building reduces waiting times and frustration for everyone.
What is Sharding ?
Sharding is a technique that improves the scalability of the Ethereum blockchain by splitting the network into smaller parts called “shards.” Each shard can process transactions independently, increasing the overall processing capacity of the entire network.
In the original sharding solution proposed, transactions are distributed to be processed by 64 shards. Each shard has its own group of the following components:
- Proposer: The proposer is responsible for aggregating transactions and sending them to notaries for validation.
- Notaries: Notaries are responsible for validating the transactions sent by the proposer.
- Committee: The committee is a “council” composed of validators responsible for verifying the blocks in a shard through voting.
How Sharding Works
- Transactions are submitted: Users send transactions to the Ethereum network.
- Proposer aggregates transactions: Proposers in each shard select and aggregate new transactions.
- Validation by notaries: Transactions are sent from the proposer to the notaries for validation.
- Voting by the committee: After the notaries validate the transactions, the committee votes to verify and accept the blocks in the shard.
By splitting and distributing the workload in this manner, sharding allows Ethereum to handle more transactions efficiently. This is similar to having multiple elevators in a building, reducing waiting times and increasing the speed of moving between floors.
Note that the proposer will act similarly to a miner in the Bitcoin blockchain. However, notaries and committees have distinct roles. Notaries are responsible for validating transactions to compile blocks into the shard chain, while committees validate these shard chain blocks before adding them to the Beacon Chain.
“Committees function like inspectors, and an inspection team should not work with the same company indefinitely, as this can lead to corruption. Similarly, committees are regularly rotated to ensure the system’s safety and transparency.
Each proposer and committee group operates independently to maintain decentralization, but this also adds complexity to the system, prolonging transaction validation times. As illustrated below, the second Beacon Block needs to retrieve validated data from the previous block from separate committees:”
Welcome to Danksharding
To address this complexity, Dankrad Feist, a researcher at the Ethereum Foundation, introduced a new sharding solution: Danksharding, named after himself. In this solution, blocks on the Beacon Chain will include data from all shards, forming a “Mega Block” (still considered a Beacon Block), and transactions will only need one committee to be processed.
With this method, data is processed more synchronously, saving time for users when interacting with the Ethereum blockchain. As illustrated below, the second Beacon Block, instead of pulling data from three different committees, only needs to refer to a single committee:
Proposer-Builder Separation (PBS): A Solution to MEV and Slow Transaction Confirmation
Problem:
- MEV (Maximum Extractable Value): Proposers can see all user transactions and decide to skip those that are not profitable for them, leading to slow transaction confirmation for other users.
- Slow transaction confirmation: Creating “Large Blocks” takes a long time, making transaction confirmation for users slow.
Solution:
Proposer-Builder Separation (PBS):
- Separates the role of transaction aggregation (Builder) from the aggregation of transactions into a block (Proposer).
- Builder:
- Responsible for aggregating transactions.
- Does not have the right to decide to add transactions to the Beacon block.
- Proposer:
- Responsible for ordering and deciding to add transactions to the Beacon block.
- Cannot see all user transactions, helping to minimize MEV.
Benefits:
- Reduces MEV: Proposers cannot see all user transactions, so they cannot skip transactions that are not profitable for them.
- Increases transaction confirmation speed: Splitting the role helps reduce the time it takes to create “Large Blocks”, which in turn increases transaction confirmation speed for users.
- Improves security: Role separation helps reduce the risk of network attacks.
In short:
Proposer-Builder Separation (PBS) is a potential solution to the MEV and slow transaction confirmation problem on the blockchain. PBS helps reduce MEV, increase transaction confirmation speed, and improve network security.
Summary
Danksharding:
- While danksharding addresses some of the issues of the original sharding solution, it also has more technical requirements, especially for builders.Danksharding is still considered a key building block for the next steps in implementing sharding technology on the Ethereum blockchain.