Eth2 Staking Guide: Sharded Consensus
Editor's Note: This article comes fromEthereum enthusiasts (ID: ethfans)Editor's Note: This article comes from
Ethereum enthusiasts (ID: ethfans)
Ethereum enthusiasts (ID: ethfans)
, Author: Carl Beekhuizen, translation: A Jian, reproduced by Odaily with authorization.
Special thanks to Sacha Yves-Leger and Joseph Schweitzer for their corrections.
However, there is a lesser-known type of sharding in Eth2, and perhaps even more exciting from a protocol design perspective: sharded consensus.
analyze
Sharded Consensus
Just as the processing power of the slowest node in the network limits the throughput of the network, the computing resources of a single validator also determine the total number of validators that can participate in consensus. Because each new validator creates additional work for all other validators in the system, as the number of validators increases, a state will eventually be reached where the validator with the fewest resources will no longer be able to participate. Consensus (as it is no longer possible to keep track of all other validator votes). Then Eth2's solution to this problem is fragmented consensus.
analyze
There are two basic time units in the Eth2 system, slot and epoch.
A time slot is 12 seconds, which is the time we expect to produce a block; a block is actually a mechanism that allows validators’ votes to be published on the chain, not just including transactions to make the chain useful.
A period consists of 32 time slots (thus 6.4 minutes), during which the beacon chain performs all calculations related to the maintenance of the chain, including: rationalizing and finalizing new blocks, issuing rewards and penalties to validators.
As we mentioned in the first article of this series, validators are assigned to work in different committees. Then at any moment, there are verifiers who are both members of the beacon chain committee and a member of a certain shard chain committee; each verifier must send a witness message once in a period of time —— Block voting.
The security model of Eth2's fragmented consensus is based on the idea that the committee is to some extent an accurate statistical representative of the entire set of validators.
For example, if 33% of the validators in the entire validator set are malicious, then they may be included in the same committee. Then it's over.
So, we need to make sure that's not the case. In other words, what we need to guarantee is that if 33% of validators are malicious, only about 33% of validators in a committee are malicious.
Guaranteed random committee assignment of validators
There is a minimum number requirement for forming a committee
For example, if a single committee consists of 128 randomly selected validators, the probability that an attacker who controls 1/3 of the network's validators can control 2/3 of the single committee's validators is very, very small ( Probability lower than 2^-40).
secondary title
comprehensive
The votes submitted by validators are called "attestations". Attestation messages consist of several parts:
Vote for the top block of the beacon chain
Votes on Rationalization Beacon Blocks/Deterministic Beacon Chain Blocks
Vote on the latest state of the shard chain
Signatures of all validators who agreed with the vote
If each validator submits its own attestation message, and each attestation message needs to be verified separately by all other nodes, the overhead of Eth2 nodes may become very large. That's why we need "aggregation techniques".
signature aggregation
Attestation messages are designed to be easily composable, so if two or more validators voted the same, they can all be aggregated in one attestation message, simply by putting the signature fields together That's it. That's "aggregate" and what it means.
Committee votes are also fundamentally easy to aggregate, since these validators are all assigned to the same shard, so votes for shard state and votes for beacon chain blocks are likely to be the same. This is how Eth2 scales throughput as the number of validators increases. By dispersing verifiers into committees, verifiers only need to care about the members of their own committees, and only need to check very few aggregated attestation messages from other committees.
Eth2 uses the BLS signature scheme - a signature aggregation-friendly scheme defined on multiple elliptic curves. On the selected curve of the scheme, the size of a single signature is 96 bytes.
Summarize
If 10% of the total ETH participates in the pledge, Eth2 will have about 350,000 validators. This means that the size of the signature data generated by a single epoch may reach 33.6 MB, so one day is 7.6 GB. Then, in just 133 days, the signature data exceeds 1 TB.
The solution is that BLS signatures are aggregatable. If Alice submits signature A, and Bob submits signature B to the same data, then Alice's and Bob's signatures can be verified by simply storing C = A+B. Using signature aggregation technology, the validators of the entire committee can be aggregated into one signature. This reduces the storage requirement for signed data to 2 MB per day.
Summarize
The design of assigning validators to different committees reduces the amount of work required to verify Eth2 by several orders of magnitude.


