What is the distributed consensus method used in Ethereum
what is Ethereum:
Ethereum is an innovation based on the application of technologies and concepts in bitcoin to computers. Ethereum itself imitates a lot of bitcoin technology to maintain the computer platform. blockchain technology is one of them
Ethereum platform can safely run any program users want
advantages of Ethereum over other competitive currencies before Ethereum appeared, some digital currencies imitated bitcoin. However, these projects have their own shortcomings, they can only support one or several specific applications at the same time< However, the reason why Ethereum can surpass the limitations of these projects in the past is because of the core idea of Ethereum
what Ethereum wants to implement is a blockchain protocol with built-in programming language. Since it supports programming language, in theory, any blockchain application can be defined with this language, and then run on Ethereum's blockchain protocol as an application
The design of Ethereum is very flexible and adaptable
Ethereum target sets the advantages of blockchain technology, in order to add the advantages of blockchain, such as decentralization, openness and security, to almost all computing fields
blockchain applications of Ethereum
Ethereum has many blockchain applications, such as digital applications of gold and stocks, financial derivatives applications, DNS and digital authentication, etc
Ethereum has achieved more than 100 blockchain applications by many start-ups
Ethereum has also been closely watched by some financial institutions, banking consortia (such as R3), as well as large companies like Samsung, Deloitte, RWE and IBM. As a result, a number of blockchain applications such as simplified and automated financial transactions, merchant loyalty index tracking, and gift cards designed to achieve decentralization of electronic transactions have emerged
the relationship between Ethereum and blockchain:
Ethereum is a programmable blockchain
Ethereum does not give users a series of preset operations (such as bitcoin transaction), but allows users to create complex operations according to their own wishes
in this way, Ethereum can be used as a platform for various types of decentralized blockchain applications, including but not limited to cryptocurrency
like other blockchains, Ethereum also has a peer-to-peer network protocol. Ethereum blockchain database is maintained and updated by many nodes connected to the network. Each network node runs the Ethereum simulator and executes the same instructions. Therefore, people sometimes call Ethereum "world computer"
many new users believe that the sole purpose of mining is to generate ether in a way that does not require a central issuer (see our guide "what is ether?"). It's true. The token of Ethereum is proced in the process of mining, with a mining rate of 5 Ethereum coins per piece. But mining is at least as important. Usually, banks are responsible for keeping accurate records of transactions. They make sure that money is not created out of thin air and that users don't cheat and spend money many times. However, blockchain introces a new way to keep records, the whole network instead of intermediary, to verify transactions and add them to the public ledger
Ethereum mining
although "no trust" or "trust minimization" monetary system is the goal, there are still people who need to ensure the security of financial records and ensure that no one cheats. Mining is one of the innovations that makes decentralized records possible. Miners have reached a consensus on the history of transactions in terms of preventing fraud (especially double spending on ether) - an interesting issue that hasn't been addressed before the decentralized currency works on the blockchain. While Ethereum is looking at other ways to reach a consensus on the effectiveness of the deal, mining currently keeps the platform together
how mining works
today, the mining process of Ethereum is almost the same as that of bitcoin. For each transaction, the miner can use the computer to guess the answer repeatedly and quickly until one of them wins. More specifically, the miner will run the unique header metadata (including time stamp and software version) of the block through the hash function (which will return a fixed length, unordered string of numbers and letters, which appears to be random), changing only the 'nonce value', which will affect the hash value of the result
if the miner finds a hash that matches the current target, the miner will be granted ether and broadcast the block across the network for each node to verify and add to their own ledger . If miner B finds the hash, miner a stops working on the current block and repeats the process for the next block. It's hard for miners to cheat in this game. There is no way to fake the work and come up with the right answer to the puzzle. That's why solving puzzles is called "proof of work."
on the other hand, others have little time to verify whether the hash value is correct, which is exactly what each node does. About every 12-15 seconds, a miner finds a stone. If the miner starts to solve the puzzle faster or slower than this, the algorithm will automatically re adjust the difficulty of the problem so that the miner can rebound to about 12 seconds of solution time
miners earn these ethers randomly, and their profitability depends on their luck and the computing power they put in. The specific workload verification algorithm used by Ethereum is called "ethash", which aims to require more memory, making it difficult to mine with expensive ASIC. Special mining chips are now the only profitable way to mine bitcoin
in a sense, ethash may have achieved this goal successfully, because dedicated ASIC is not available for Ethereum (at least not yet). In addition, as Ethereum aims to shift from proof of work mining to "proof of equity" (which we will discuss below), buying ASIC may not be a wise choice because it may not prove useful for a long time< However, Ethereum may never need miners. Developers plan to abandon proof of work, the algorithm currently used by the network to determine which transactions are valid and protect them from tampering to support proof of equity, which is guaranteed by token owners. If and when the algorithm is launched, proof of equity can become a means to achieve distributed consensus, and the consensus uses less resources.
after Ethereum is upgraded to version 2.0 POS mechanism, miners may switch mining machines to other networks
as Ethereum is finally ready to start its Ethereum 2.0 upgrade later this year, thus eliminating the long-term delay, the network will start to move towards the proof of rights model
therefore, the network will give up the workload proof consensus algorithm, so that eth miners have little choice. As their equipment will become obsolete, they will be forced to start mining counterfeit coins or re qualify as eth mortgagors. So, what is the current situation of Ethereum mining? With the coming transition, what will happen to the whole instry< At present, Ethereum consensus is based on POW system, which is similar to bitcoin (BTC). As a result, Ethereum's mining process is almost the same, as miners use their computing resources to earn rewards for each block they try to complete< However, there are still major differences between these processes. Although bitcoin mining has relied almost entirely on ASIC (large, loud machines designed specifically for cryptocurrency mining, most of which are concentrated in areas with low electricity prices), Ethereum's pow hash algorithm ethash is designed to support global chip manufacturers (such as NVIDIA and AMD). As Thomas Heller, global business director of cryptocurrency mining pool f2pool, explained in a conversation with cointegraph, GPU is much cheaper and easier to access than ASIC
"as ASIC is a very professional machine, when a new generation of procts is released, it is usually a huge technological leap. As a result, they have a much higher hash rate and are more energy efficient than the previous generation. This means that those manufacturers have spent a lot of money to research and develop it. Their machines are usually very expensive, and GPUs are much cheaper. "
Heller added that those who use GPU miners "have more flexibility to mine." For example, the popular NVIDIA geforce GTX 1080 Ti card can mine more than 15 different currencies, while ASIC units usually support only one currency
nevertheless, Ethereum is not completely immune to ASIC miners - at least in its current state. In April 2018, bitcontinent released antminer E3, an ASIC specially proced for mining Ethereum. Although widely praised for its hash rate of 180 megahashes per second and power consumption of 800 watts, it has received different responses from the Ethereum community. After the ASIC is inserted, a considerable number of GPU rig owners seem to suffer from loss of profits, and some are even forced to switch to other networks
"in the white paper, ETH must have ASIC resistance. I would like to say that the white paper stands for something "is one of the highest comments on the AR / ethermining topic about the topic discussed when antminer E3 was announced. Another reddit user argued that "the $800 only applies to 180mh."“ Split or die of a nation. "
some Ethereum users continue to suggest that bitmain's mining devices can lead to greater concentration, thus increasing the possibility of attack by 51%. Soon, a group of developers put forward "programmed workload proof" or progpow, which is an extension of the current Ethereum algorithm ethash, aiming to make GPU more competitive and promote decentralization
according to a paper published in March by Kristy Leigh Minehan, co-founder of progpow, about 40% of the hash rate of Ethereum is generated by bitmain ASIC. Alejandro de la Torre, the vice president of poolin, is the sixth largest pool of eth. He confirmed to cointegration that "GPU mining is still dominant" in Ethereum network, and added:
"at present, the profit of eth mining is not high, and the management threshold and cost of GPU equipment are higher than ASIC equipment. Compared with ASIC devices, GPU devices are more flexible, and you can use other algorithms to switch to other coins. "
progpow has not been integrated into Ethereum, and it is not clear when it will be finally implemented - in March, Ethereum core developers were debating whether progpow will really benefit the network in nearly two hours, and failed to reach a consensus. It is worth noting that a bitmain representative has previously told cointegraph that the mining hardware giant does not intend to extend the service life of antminer E3 to start operation after October 2020: "as far as we know, mining will end in October or some time after that."
a safe but uncertain future
indeed, Ethereum will stay away from mining in the future. Ethereum 2.0, which is planned to be launched later in 2020, is a major network upgrade on the blockchain, aiming to transfer its current POW consensus algorithm to a virtual POS (known as "block verifier")
more specifically, users are randomly selected considering their wealth in the network or their "interests". In other words, the more coins a POS verifier chooses to put in, the more coins accumulated as a reward
according to vitalik buterin, the co-founder of Ethereum, e to the transition, the network will be more secure and the attack cost will be higher than the network of bitcoin, although the debate about the better consensus algorithm in the encryption community has lasted for many years. However, it is not clear when to start Ethereum 2.0, as many errors and management issues are reported to be delaying the process
another hypothetical benefit of POS system is that it has higher energy efficiency than pow blockchain. According to digiconomist, the cryptocurrency's total annual footprint is 59.31 terawatts per hour, which is comparable to the electricity consumption of Greece as a whole. However, since a report in July 2019 estimated that 74% of the exploitation of bitcoin was done using renewable energy, the environmental impact of bitcoin does not seem to be so serious
what will happen to the actual Ethereum miner? According to the documentation of Casper upgrade as part of Ethereum 2.0 roadmap, the network will initially support a hybrid model including both POW and POS, thus providing some space for block verifiers and GPU / ASIC miners. Jack O & 39, CEO of skale network; "There will definitely be a transition period when two networks are running at the same time," Holleran told cointegration The CEO of scale network (based on Ethereum's blockchain platform) gave a detailed description of this process:
"the transition from eth1 to eth2 takes time of course - it may be years rather than months. The good news about this slow transition is that dapps and defi platforms will be able to roam around based on survivability, security and real-world evidence of adoption. This is a positive impact on the Ethereum ecosystem. "
dig or not
once Ethereum is fully in the POS orbit, miners will have two options. One is to sell the equipment and use the money to accumulate more Eth and start mortgage. The other is the choice for GPU miners, which is simply switching to other ethash networks and mining counterfeit money. Nick foster, a representative of kabombacks, a US mining equipment dealer, told cointegration that most eth miners would choose the latter:
"what I want to say is that most of the miners have not really entered Ethereum or the mining of specific tokens. Yes, there is a certain amount of mineral deposits and holds, but I oppose the view that a large number of Shanzhai coin miners hold their coins at any time. "<
foster then described how he used 3gb GPU units to mine ethash's point-to-point blockchain asset ravencoin (RVN). Once it was unable to mine eth, he said, "this is the reason for mining crows. I immediately sold stability to BTC, and then sold it to US dollars to pay for my rights. I would say that a lot of people are adopting this strategy. "
as foster concludes, he wants eth miners to jump out of the network, and new players - those who don't invest in power infrastructure or drilling rigs - will take a stake in eth. He described the following:
"I can't imagine if I found a five-year lease with $0.04 of electricity and I was mining eth, I decided to sell everything and then continue to pay the rent so that I could hold eth as a share. Substitute. "
Marc fresa, founder of asic.to, a mining firmware company, agreed in a conversation with cointegraph: "if you invest in mining, you won't bet because you have enough room to grow."
one of the main counterfeit coins that may benefit from POW miners leaving Ethereum is Ethereum classic (etc), which is a more conservative version of the blockchain. It is reported that there is no POS related plan. As it also runs on the ethash algorithm, the startup of Ethereum 2.0 may lead to the migration of miners, so its hash rate may have a significant peak
eth's larger pools have similar options. When asked about the company's plans for Ethereum after pow, Heller told cointegraph that after the announcement of Ethereum's POS upgrade, f2pool launched a sister company called story.fish in early 2018. Story.fish has started to provide mortgage services for other POS and delegated POS projects, such as tezos (xtz), Cosmos (atom) and Cardano (ADA), e to numerous handover delays. For prin, e to the transition to POS, it "may temporarily give up supporting eth mining," de la Torre told cointegraph
other top eth pools, namely nanopool, ethermine, pool center, sparkpool and spiderpool, did not respond to requests for comment from cointegraph.
the blockchain system uses the distributed consensus algorithm to generate and update data, which eliminates the possibility of illegal tampering with data from the technical level, thus replacing the third-party intermediary institutions in traditional applications to ensure trust and transaction security, and recing the time cost, human cost and resource consumption caused by maintaining credit.
to put it simply: if you are only the holder of eth, you don't need to make any preparation for this upgrade.
when it comes to blockchain, we must talk about its consensus mechanism. If we don't understand the consensus mechanism of blockchain, we can't understand the real meaning of blockchain. So, what about the consensus mechanism of today's blockchain
what is the consensus mechanism
what is consensus? Take its literal meaning, that is & quot; Common understanding & quot
people are different, not only in stature, appearance and ability, but also in culture, views, ideas, interests and so on
consensus, in short, is the consensus reached by members of a group in a certain aspect
we have learned that trust is a major pain point in the operation of society. Banks have their own credit system. In the past, the financial system only served a few entrepreneurs, because the establishment of credit system cost a lot. Later, Alipay had sesame credit. Credit has already been related to many aspects of life, credit card size, spending amount of flowers, sesame credit and high going abroad can be avoided. We are enjoying the convenience of credit
the essence of blockchain is decentralization, and the core of decentralization is consensus mechanism. The consensus mechanism on blockchain mainly solves the problems of who constructs the block and how to maintain the unity of blockchain
the goal of the blockchain consensus mechanism is to make all honest nodes save consistent blockchain views, while meeting two properties:
1) consistency: the prefix part of the blockchain saved by all honest nodes is exactly the same
2) effectiveness: the information released by an honest node will be recorded in its own blockchain by all other honest nodes
the confidence of blockchain is mainly reflected in the fact that users distributed in the blockchain do not need to trust the other party of the transaction or a centralized organization, and only need to trust the software system under the blockchain protocol to realize the transaction
what is the consensus mechanism? What do pow, POS and dpow mean
the necessity of consensus mechanism
in a distributed system, multiple hosts form a network cluster through asynchronous communication. In such an asynchronous system, state replication between hosts is needed to ensure that each host can reach a consensus. Error messages may appear in asynchronous systems and propagate continuously, so it is necessary to define fault-tolerant protocols in default unreliable asynchronous networks to ensure that all hosts reach a safe and reliable state consensus, which is the necessity of consensus mechanism
the premise of such self-confidence is the consensus mechanism of the blockchain, that is, in a market of mutual distrust, the sufficient and necessary condition for each node to reach an agreement is that each node will spontaneously and honestly abide by the pre-set rules in the agreement to judge the authenticity of each record for the sake of maximizing its own interests, Finally, the records judged to be true are recorded in the blockchain. Attachments-2018-08-9yy7vrha5b738e3d96021. JPG
in other words, if each node has its own independent interests and competes with each other, it is almost impossible for these nodes to conspire to cheat you, especially when they have public reputation in the network. Blockchain technology is the use of a set of mathematical algorithms based on consensus to establish & quot; Trust & quot; Network, so as to create new credit through technical endorsement rather than centralized credit institutions
Introction to several consensus mechanisms in today's blockchain
there are many consensus mechanisms in blockchain, but none of them is perfect, or suitable for all application scenarios
POW workload proof
each node in the whole system provides computing power (referred to as computing power) for the whole system. Through a competitive mechanism, the node with the best computing work can be rewarded by the system, that is, to complete the allocation of newly generated currency. It is simply understood that more work pays more. Currency blockchains such as bitcoin and LTC apply POW mechanism
advantages
completely decentralize the nodes to get in and out freely, the algorithm is simple, easy to realize, and the cost of destroying the system is huge. As long as the computing power of the network destroyer does not exceed 50% of the total computing power of the network, the transaction status of the network can reach an agreement
disadvantages
waste energy, which is the biggest disadvantage. It is difficult to shorten the block confirmation time, for example, bitcoin can only do 7 transactions per second, It is not suitable for commercial application. A new blockchain must find a different hash algorithm, or it will face bitcoin's computing power attack. It has high requirements on the performance of the nodes, and the network environment is prone to bifurcation. It needs to wait for multiple confirmations, and can not reach the final agreement
POS proof of equity
also known as proof of equity, which is similar to you deposit your property in the bank, This model will allocate interest to you according to the amount and time of cryptocurrency you hold< Advantages
low requirements for node performance and short consensus time
disadvantages
there is no final consistency, so checkpoint mechanism is needed to make up for the finality
dpow is an evolutionary scheme of pos. in conventional POW and POS, any newly added block needs to be confirmed by all nodes of the whole network, which greatly affects the efficiency
dpos is similar to the voting mechanism of modern board of directors, which elects representatives to vote and make decisions. The N selected accounting nodes are used for the creation, verification, signature and mutual supervision of new blocks, which greatly reces the time and computational cost of block creation and confirmation
advantages
greatly rece the number of nodes participating in verification and accounting, which can achieve second level consensus verification
disadvantages
sacrifice the concept of decentralization, which is not suitable for public chain
pbft practical Byzantine fault tolerance
practical Byzantine fault tolerance mechanism is a kind of adoption & quot; Permission to vote, minority subject to majority & quot; The consensus mechanism allows Byzantine fault tolerance, allows strong supervision nodes to participate, has the ability of authority classification, higher performance and lower energy consumption, and each round of bookkeeping will be jointly elected by the whole network nodes, allowing 33% of nodes to do evil, and the fault tolerance rate is 33%. Practical Byzantine fault tolerance is especially suitable for the application scenario of alliance chain<
advantages
will deviate from centralization, the existence of cryptocurrency and reward mechanism will proce Matthew effect, making the poor poorer and the rich richer in the community, achieving high consensus efficiency and realizing high-frequency trading
disadvantages
when only 33% of the nodes in the system are running, the system will stop running
dbft authorizes Byzantine fault tolerance
this mechanism is to use rights to select bookkeeper, Then bookkeepers reach a consensus through Byzantine fault-tolerant algorithm. The core of Byzantine fault tolerance mechanism is to ensure the system's finality to the maximum extent, so that the blockchain can be applied to real financial application scenarios
advantages
Professional bookkeeper can tolerate any type of error, bookkeeping is completed by multiple people, each block has finality, no bifurcation, the reliability of the algorithm has strict mathematical proof
disadvantages
when one-third or more bookkeepers stop working, the system will not be able to provide services, when one-third or more bookkeepers jointly commit crimes, The system may be bifurcated
pool verification pool
based on traditional distributed consistency technology and data verification mechanism
advantages
it can work without cryptocurrency. Based on the mature distributed consistency algorithms (pasox, raft), it realizes second level consensus verification
disadvantages
the degree of decentralization is not as good as bitcoin, which is more suitable for the multi center business model with multi participation
Paxos
this is a traditional distributed consensus algorithm, which is a consensus mechanism based on election leaders. The leader node has absolute authority, and allows strong supervision node to participate, which has high performance and low resource consumption. Generally, all nodes have wired access mechanism, but there is no malicious node in the election process, which is not fault-tolerant< In Paxos algorithm, nodes are divided into three types:
proposer: put forward a proposal and wait for everyone's approval. The client often plays the role
acceptor: responsible for voting on the proposal. Usually, the server plays this role
learner: is informed of the result of the case settlement, and unifies with it, and does not participate in the voting process. Maybe the client or server
Paxos can ensure that the system can reach a consensus when more than 50% of the normal nodes exist
REBO consensus mechanism
REBO consensus algorithm enables a group of nodes to form a consensus based on the special node list. The initial special node list is like a club. To accept a new member, it must be voted by 51% of the members of the club. Consensus follows the & quot; 51% rights;, Outsiders have no influence. Since the club starts with centralization, it will always be, and if it starts to corrupt, shareholders can do nothing. Like bitcoin and peercoin, the reborn system separates shareholders from their voting rights, so it is more centralized than other systems
peercoin
peercoin (PPC) is a combination of proof of pow workload and proof of POS equity. POW is mainly used to issue currency. In the future, with the increase of mining difficulty, the output will decrease, and the system security will be mainly maintained by POS
in the blockchain network, e to different application scenarios, different goals are designed, and different blockchain systems adopt different consensus algorithms. Each consensus algorithm is not perfect and has its own advantages and limitations
blockchain solves the problems of transmitting trusted information and value transfer on untrusted channels, while consensus mechanism solves the problem of how blockchain achieves consistency in distributed scenarios
although the blockchain is still in the early stage of development, and the instry development is still facing some obstacles, the society has recognized the value of the blockchain enough, the pace of blockchain development will never stop, and the instry development will certainly find a way to break through the obstacles.