Validated, staking on eth2: #3 - Sharding Consensus
The Power of Sharding Consensus in Eth2
In the previous installment of this series, we explored the concept of sharding in Eth2, a mechanism that allows the network to scale by breaking down the storage and computation of the entire system into smaller, more manageable pieces. However, there's a lesser-known aspect of sharding in Eth2 that's arguably more exciting from a protocol design perspective: sharded consensus.
The Problem with Validator Capacity
In traditional Byzantine Fault Tolerant (BFT) protocols, the processing power of the slowest node limits the throughput of the network. Similarly, in Eth2, the computing resources of a single validator limit the total number of validators that can participate in consensus. This is because each additional validator introduces extra work for every other validator in the system, making it increasingly difficult for the network to scale.
Introducing Sharded Consensus
To address this issue, Eth2 employs a novel approach called sharded consensus. By breaking down the validators into smaller committees, each committee can focus on a specific shard of the network, reducing the computational load and increasing the overall scalability of the system.
Time and Committees
In Eth2, time is divided into two durations: slots and epochs. A slot is a 12-second time frame in which a new block is expected to be added to the chain. An epoch is comprised of 32 slots (6.4 minutes) during which the beacon chain performs all the calculations associated with the upkeep of the chain, including justifying and finalizing new blocks, and issuing rewards and penalties to validators.
Committee Assignments
Validators are organized into committees to perform their work. At any given time, each validator is a member of exactly one beacon chain and one shard chain committee, and is called upon to make an attestation exactly once per epoch. An attestation is a vote for a beacon chain block that has been proposed for a slot.
Ensuring Committee Security
The security model of Eth2's sharded consensus relies on the idea that committees are more or less an accurate statistical representation of the overall validator set. To ensure this, committee assignments are made randomly, and a minimum number of validators are required in each committee. This ensures that if 33% of validators are malicious, only about 33% of validators in a committee will be malicious.
Attestations and Aggregation
Votes cast by validators are called attestations. An attestation is comprised of many elements, including a vote for the current beacon chain head, a vote on which beacon block should be justified/finalized, a vote on the current state of the shard chain, and the signatures of all validators who agree with that vote. By combining as many components as possible into an attestation, the overall efficiency of the system is increased.
Signature Aggregation
Eth2 makes use of the BLS signatures, a signature scheme defined over several elliptic curves that is friendly to aggregation. On the specific curve chosen, signatures are 96 bytes each. By using signature aggregation, only one signature needs to be stored and checked for the entire committee, reducing the storage requirements to less than 2 megabytes per day.
Practical Implications
The committee mechanism helps Eth2 achieve two of the design goals established in the first article: namely that participating in the Eth2 network must be possible on a consumer-grade laptop, and that it must strive to be maximally decentralized by supporting as many validators as possible. To put numbers to it, while most BFT protocols scale to tens (and in extreme cases, hundreds) of validators, Eth2 is capable of having hundreds of thousands of validators all contributing to security without compromising on latency or throughput.
Forward-Looking Thoughts
The sharded consensus mechanism in Eth2 has the potential to revolutionize the way we think about scalability and security in blockchain networks. By breaking down the validators into smaller committees, Eth2 can achieve unprecedented levels of scalability and decentralization, making it an attractive option for a wide range of use cases. As the Eth2 network continues to evolve and mature, it will be exciting to see how this mechanism is refined and improved to meet the needs of a rapidly growing community of users and developers.
Source: https://blog.ethereum.org/en/2020/03/27/sharding-consensus




