Home  >  Article  >  What is the beacon chain in Ethereum 2.0?

What is the beacon chain in Ethereum 2.0?

DDD
DDDforward
2024-03-06 13:40:12779browse

Ethereum 2.0 is intended to solve the consensus and scalability issues of Ethereum. Based on the consensus issue, a new concept is proposed, the Beacon Chain, and based on the scalability issue, a new concept is proposed, the Shard Chains. ).

Today I will share with you what the beacon chain is and what functions it has.

01

What 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 to solve the consensus problem, while the Shard Chains (Shard Chains) are designed to solve the problem of Ethereum scalability issues.

The reason why shard chain can solve performance problems is that it processes transactions through multi-shard technology, which improves the efficiency and performance of the system. The following figure shows the structure diagram of beacon chain and shard chain. , where the beacon chain is at the coordination layer and is responsible for coordination and management, while the sharding chain is at the data layer and is responsible for the data part.

What is the beacon chain in Ethereum 2.0?

We can see in the picture, why do we need the beacon chain? The beacon chain is like a core spine, supporting and connecting each shard chain. In fact, the beacon chain is the core that injects vitality into the entire Ethereum 2.0 system and is responsible for commanding and coordinating all participants in the system. So what can it do?

02

What can the beacon chain do?

What is the beacon chain in Ethereum 2.0?

First of all, This chain is a proof-of-stake POS blockchain, which allows verification Players can participate in the staking system, replace the role of miners and become chain builders. In other words, the beacon chain manages the list of validators and the tasks of sharded validators.

How can I become a verifier of the beacon chain?

First you need to send a deposit (32 Ether) to a contract on the current Ethereum main chain, and then after a series of audit checks, you will receive an electronic receipt (Ether event in the smart contract), this receipt is equivalent to a VIP card. With this card, you have verification qualifications and become a verifier. If you are "active" you may be selected to be a block proposer.

After becoming a validator, the beacon chain will arrange tasks for you.

It will randomly assign you to one or two shards for verification. We know that under the proof-of-work mechanism, which is our current Ethereum main chain, miners generate the next block through mining, but under the proof-of-stake mechanism, there is no mining, and the next block is generated by the verifier. chosen by them. This selection is random and cannot be controlled by a single verifier, 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 select a new block together with other validators of the shard.

Then the block proposer of the shard will collect transactions for this shard and include these transactions into the block just selected by the validators, although since you are not a block The proposer of the block does not have the power to include the transaction into the new block, but as a verifier, you can verify whether the block proposer behaves appropriately during this process.

If you perform well and do what you should do as a validator, you will be rewarded. On the contrary, if you violate the rules, you will be punished. The penalty is to deduct a part from your mortgage of 32 ETH. When the mortgage is lower than After 16 ether, the beacon chain will remove you from the validator list.

If one day you no longer want to be a validator, your mortgaged Ethereum plus the rewards you received and minus the Ethereum you deducted due to penalties will not be returned to your previous Ethereum main chain. , but will be stored in a certain shard chain.

In addition to managing validators, the beacon chain also needs to store some certifications (Attestation).

We know that the current Ethereum blockchain stores data information about our usual asset transfers and other transactions, but the beacon chain is different from the current Ethereum main chain. It stores a 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 into the soy milk machine for processing, you cannot judge the shape and size of the previous beans based on the obtained soy milk. feature. And if you add one more bean, the soy milk you get will change a lot. You can't determine which particle in the soy milk your bean is. This soy milk machine is like a hash algorithm, The result after hashing cannot be used to deduce the appearance before hashing, and as long as the data before hashing changes a little, the result after hashing will change greatly. In the beacon chain, the verifier verifies and signs the transaction, such as a transfer transaction, and then hashes it into a string, and stores this string in the beacon chain. At this time, this string represents the data of a transaction. The advantage of this is that you do not need to delve into which shard this transaction occurred.

Once the status in the shard changes (for example, the balance of an account changes slightly), the verifier will report the change to the beacon chain. Therefore, the beacon chain tracks changes in shards in real time and establishes connections and communications between shards.

03

Summary

Generally speaking, the beacon chain is like a signal light, directing all aspects of the system. This behavior stores a large amount of authentication data. However, this kind of command is decentralized. For example, the voting behavior of participating validators is determined by the validators themselves and cannot be influenced by the beacon chain. Finally, the beacon chain and shard chain still involve many technical difficulties, and the Ethereum team is also working hard to move forward.

The above is the detailed content of What is the beacon chain in Ethereum 2.0?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:zhihu.com. If there is any infringement, please contact admin@php.cn delete