Ethereum 2.0 is intended to solve the consensus problem and scalability problem of Ethereum. Based on the consensus problem, a new concept is proposed, which is the Beacon Chain, and based on the scalability problem, the Shard Chain is proposed. Today, Dabai will tell you what is a beacon chain and what functions the beacon chain has.
01What is the beacon chain?
Beacon Chain, the English name is Beacon Chain, Beacon, which means lighthouse, signal buoy. It is actually the core of the Ethereum 2.0 system.
The beacon chain is a brand new proof-of-stake (PoS) blockchain , which is designed to solve the consensus problem, while the shard chain (Shard Chains) is designed to solve the scalability problem of Ethereum.
The reason why the shard chain can solve the performance problem is that it is equivalent to processing transactions through multi-shard technology, which improves the efficiency and performance of the system. The following figure shows the structure diagram of the beacon chain and the shard chain, in which the beacon chain is in the The coordination layer is responsible for coordination and management, while the shard chain is in the data layer and is responsible for the data part. As we can see in the diagram, why do we need a beacon chain? The beacon chain is like a core backbone, supporting and connecting the various shard chains. In fact, the beacon chain is the core that breathes life into the entire Ethereum 2.0 system and is responsible for commanding and coordinating all participants in the system. So what can it do?
02What can the beacon chain do?First, this chain is a proof-of-stake (PoS) blockchain , which allows validators to participate in the staking system, replacing the role of miners and becoming chain builders. That is to say, the beacon chain manages the list of validators, as well as the shard validator tasks.
How can I become a validator of the beacon chain?
First you need to send a deposit (32 ETH) to a contract on the current Ethereum main chain, then after a series of audit checks, you will receive an electronic receipt (event in the Ethereum smart contract), this The receipt is equivalent to a vip card. With this card, you have the qualification for verification and become a verifier. If you are “active”, you may be selected as a block proposer.
After becoming a validator, the beacon chain will assign tasks to you .
It will randomly assign you to one or two shards for verification. We know that under the proof-of-work mechanism, that is, our current Ethereum main chain, miners generate the next block by mining, but under the proof-of-stake mechanism, there is no mining, and the next block is generated by Validators choose. This choice is random and cannot be controlled by a validator, which also reflects the characteristics of decentralization.
If you are not very “active”, after the beacon chain assigns you to a shard, you need to choose a new block with other validators of that shard.
Then the block proposer of the shard will collect transactions for this shard and include these transactions in the block just selected by the validators, although since you are not the proposer of the block, there is no The right to include the transaction in the new block, but you as the validator can now verify that the block proposer behaved properly in the process. If you perform well, you will be rewarded for doing what you are supposed to do as a validator. Conversely, if you violate the rules, you will be punished. The penalty is a deduction from the 32 ETH you staked. When the stake is less than 16 ETH After the coins, the beacon chain will remove you from the validator list. If one day you don’t want to be a validator, the ether you staked plus the rewards you get and minus the ether you deducted for punishment will not go back to your previous Ethereum main chain, but will be deposited into a shard chain.
In addition to managing validators, the beacon chain also needs to store some Attestations.
We know that the current Ethereum blockchain stores the data information of our usual transactions such as asset transfers, but the beacon chain is different from the current Ethereum main chain, which stores a series of calculated strings. The generation of this string is based on a hash operation in the computer. It is just like in life, after you put the beans in the soymilk machine for processing, you cannot judge the shape and size of the beans according to the obtained soymilk. And if you add an extra bean, the soymilk you get will change a lot. You can’t determine which particle in the soymilk your bean is. This soymilk machine is like a hash algorithm , which cannot pass the hash. The result is derived from what it looked like before hashing, and as long as the data before hashing changes a little, the result after hashing will change a lot.
In the beacon chain, the verifier verifies and signs the transaction, such as a transfer transaction, and then hashes it into a string, which is stored in the beacon chain. At this time, the string represents a transaction The data of the transaction, the advantage of this is that you don’t have to delve into which shard the transaction happened in. Once the state in the shard changes (such as a slight change in the balance of an account), the validator will report the change to the beacon chain. Therefore, the beacon chain tracks the changes of the shards in real time, and also establishes the connection and communication between the shards.
03Summary In general, the beacon chain is like a signal light, directing various behaviors of the system and storing a large amount of authentication data. However, this kind of command is decentralized. For example, the voting behavior of the participating validators is determined by the validators themselves, and the beacon chain cannot be controlled. Finally, the beacon chain and the shard chain also involve many technical difficulties, and the Ethereum team is also forging ahead.
Reminder: For more information on crypto exchange, currency war, and BTC, you can follow reelfinancial.com to provide you with the most comprehensive information on Bitcoin, currency speculation, and so on.