How does Ethereum mine?

Huw
2022-03-10 21:19:04

The consensus mechanism of Bitcoin is PoW (this is the abbreviation of Proof of Work in English, which means "Proof of Work") . Simply put, the more you work, the more you get. The more computational work you put in, the more likely you are to be the first to find the correct hash, and the more likely you are to be rewarded in Bitcoin. However, Bitcoin's PoW has certain defects, that is, it processes transactions too slowly, and miners need to constantly collide with hash values through calculations, which is labor-intensive and inefficient.

In order to make up for the shortcomings of Bitcoin, Ethereum has proposed a new consensus mechanism called PoS (this is the English abbreviation, which means "Proof of Equity", which is also translated into "Proof of Equity"). In simple terms, PoS is actually the same as its literal meaning: equity, equity, the more coins you hold, the more equity you have, and the higher your equity. The PoS of Ethereum means: the more coins you hold, the longer you hold coins, the lower your computational difficulty and the easier it is to mine.

It is true that the consensus mechanism of Ethereum is PoS, but PoS is just a plan or goal at the beginning of the release of Ethereum. The consensus mechanism adopted by Ethereum is also PoW, which is the PoW of Bitcoin. In the initial setting of Ethereum, Ethereum hopes to build a relatively stable system by adopting PoW in the early stage, gradually adopting PoW+PoS, and finally transitioning to PoS completely.

There are two information points involved here. The first information point is: the PoW adopted by Ethereum is the PoW of Bitcoin, but it is not exactly the same, and there are differences; the second information point is: the original setting of Ethereum It is hoped that the transition from PoW to PoS will be finally realized through staged upgrades. In the following, we will explain these two information points one by one.

The first information point: The consensus mechanism currently adopted by Ethereum is also PoW, but it is slightly different from Bitcoin's PoW. So, what is the difference between PoW and Bitcoin?

Simply put, the difficulty of mining Ethereum can be adjusted, but the difficulty of mining Bitcoin cannot be adjusted. Just like our college entrance examination, because the teaching situation and the number of students in different provinces are different, the college entrance examination is divided into national papers and independent propositions of each province. Ethereum said that I was in favor of such regional questions, and Bitcoin said: No, it must be the same volume in the whole country, and everyone has the same difficulty!

The popular explanation is that Bitcoin uses computer computing power to do a large number of hash collisions, and lists various possibilities to find a correct hash value. As for the Ethereum system, it has a special formula for calculating the difficulty of each subsequent block. If a block is verified faster than the previous block, the Ethereum protocol increases the difficulty of the block. By adjusting the block difficulty, you can adjust the time it takes to validate a block.

The Ethereum protocol stipulates that the dynamic adjustment method of difficulty is to make the time interval for creating new blocks in the whole network to be 15 seconds, and the network takes 15 seconds to create the blockchain. In this way, because the time is too fast, the synchronization of the system is greatly improved , it is difficult for malicious actors to use 51% (that is, more than half) of the computing power to modify historical data in such a short time.

The second point of information is: In the initial setting of Ethereum, it is hoped that the transition from PoW to PoS will be finally realized through staged upgrades.

Back in 2014, at the beginning of Ethereum’s release, the team announced that the project’s release would be divided into four phases, namely Froniter (Frontier), Homestead (Homestead), Metropolis (Metropolis), and Serenity (Serenity). The consensus mechanism in the first three stages adopts PoW (Proof of Work), and the fourth stage switches to PoS (Proof of Stake).

On July 30, 2015, the first phase of Ethereum "Frontier" was officially released. This phase is only suitable for developers. Developers can write smart contracts and decentralized applications DAPP on the Ethereum network, and miners start Enter the Ethereum network to maintain network security and mine to get ether. The bleeding edge version is similar to the beta version, proving whether the Ethereum network is reliable at all.

On March 14, 2016, Ethereum entered the second stage of "home". At this stage, Ethereum provided a wallet function, so that ordinary users could easily experience and use Ethereum. There is no obvious technical improvement in other aspects, but it just shows that the Ethereum network can run smoothly.

In September 2017, Ethereum has progressed to the third phase "Metropolis". "Metropolis" consists of two upgrades from Byzantium and Constantinople. The goal of this stage is to introduce a hybrid chain model of PoW and PoS to prepare for a smooth transition from PoW to PoS. This is the most popular "Ethereum Constantinople upgrade" upgrade recently. In the Constantinople upgrade, Ethereum will make some changes to the underlying protocols and algorithms to lay a good foundation for the realization of PoW and PoS. Base.