From POW to Casper to experience the evolution of the Ethereum consensus mechanism(2)

in #proof6 years ago

Foreword
The blockchain originated in Bitcoin and was developed in Ethereum. Want to have a systematic understanding of the blockchain, it is best to know the principles of Bitcoin and Ethereum, which is why I wrote from Bitcoin and Ethereum.

For the blockchain project, the consensus mechanism is its fundamental value. The consensus is the basis of the application of the blockchain, which refers to how the participants collaborate in this system. Therefore, this article hopes to summarize the consensus mechanism of Bitcoin and Ethereum to help you better understand the value of the blockchain.

Text

What can the blockchain do?

After the birth of Bitcoin, people found that the consensus mechanism can provide a new way of collaboration.

For example, game developers can plug the blockchain software development kit (SDK) into the trading part of the game. This part of the data will follow the blockchain's own transaction data and be packaged and confirmed by the miners.

This approach saves gamers the cost of storage and computing. For the players, their transaction history cannot be tampered with by anyone, so there is no mistake.

For another example, Company A purchased a value of 100,000 US dollars from Company B. The two parties signed a contract, and Company C made a certificate as a guarantee, and agreed to pay after one month. The contract information was packaged by the miners into the blockchain and could not be tampered with.

Company B delivers the goods, and Company C confirms the qualification. Both parties sign the same in the payment account to make the contract in the blockchain effective. After 1 month, the company A account will automatically pay to company B without manual intervention.

In fact, the blockchain project “hyperledger” is actively working on the second example. At present, more than 200 companies have participated in this project, including ABN Amro, BNP Paribas, Huawei, Samsung, and IBM.

It can be seen that when the miners package to confirm not only the transaction records, but the broader data, the use of the blockchain will also expand, and its functions are similar to common applications such as cloud computing and Alipay.

Because the blockchain has the characteristics of being unable to tamper with and automating the execution of contracts, the cost of communication, trust, and execution is greatly reduced, and it is favored by enterprises in some scenarios.

But at this stage, if the blockchain technology wants to be applied on a large scale, it still needs to solve many problems, especially efficiency and sustainability.

Therefore, compared to Bitcoin, Ethereum is more concerned with usability.

Therefore, they are trying to convert the consensus mechanism from Proof of Work (POW) to Proof Of Stake (POS).

Based on POS, it develops the unique Casper consensus mechanism of Ethereum, and improves transaction processing speed, focusing on efficiency and sustainability issues.

The plan will be implemented in two phases, the first phase called Casper FFG and the second phase called Casper CBC.
以太坊生态 英文.png

Proof of interest mechanism POS

In essence, Ethereum is also a kind of “money”, and its production process also comes from miners' bookkeeping rewards.

However, in addition to recording transaction information, the Ethereum miners also record some data in the game and financial fields. This carrier is called a “smart contract”.

Therefore, before solving the efficiency and sustainability issues, Ethereum also needs to achieve consistent results and cannot be falsified.

So how does the equity proof consensus mechanism work?

When a transfer occurs between users, the Ethereum node client will receive the message.

At the same time, all participants (nodes, or certifiers) will review the information according to the code and automatically package it into "blocks". The client then votes on these "blocks".

The "block" with the highest ticket wins, forms a "chain", and synchronizes to the Ethereum node of the whole network. At this time, the transfer information is determined to be valid.

Supporters who win the "block" will receive an Ethereum award and start a new round of voting.

Among them, the voting weight is determined by the amount of Ethereum in the client. The more the Ethereum currency held by the client, the higher the voting weight and the greater the probability of obtaining the reward.

This process is called Proof Of Stake (POS).

In POS, the "block" with the highest ticket is usually unique, and the result will be broadcasted to the whole network, which ensures the consistency of the entire network transaction record.

More importantly, in the process of generating the blockchain by the POS mechanism, it is not necessary to use the machine to calculate the "hash problem", so that the number of transactions that can be processed per second is greatly increased, and the electricity, land rent, etc. required by the machine are saved. cost.

Ethereum's equity certificate Casper

In May of this year, the first code version of the FFG phase was officially released, aiming to transform the Ethereum workload proof into Proof Of Stake (POS).

In the Casper FFG phase, one out of every 50 blocks in Ethereum is generated by the POS.

In the future Casper CBC, the Ethereum consensus mechanism will be fully converted to POS, and on this basis, two aspects of the upgrade: the margin system, Sharding.

The margin system was established to enhance security. Casper stipulates that nodes need to submit Ethereum as a margin. Once they want to cheat, such as voting for all "blocks" or trying to attack the network, their margins will all be forfeited.

Sharding is to further increase the speed at which the system handles transactions. Sharding refers to grouping nodes first, then fragmenting the complete transaction data, randomly putting them into different groups for verification, and finally packing the results into "blocks" to form a "chain".

Sharding is like writing a book. First of all, the system will "write the subject", that is, the transaction information within a certain period of time, sort out the "chapter directory"; then, randomly assign the writing tasks of different chapters to different groups. After you have finished writing it, you will combine it into a "book."

In theory, the nodes participating in the verification are infinitely numerous, and the grouping will be infinitely large. Therefore, the transaction speed of Ethereum is infinitely fast.

From the current progress, Ethereum is expected to complete the Casper CBC online before the end of next year.

At the same time, the Ethereum network will be completed with the launch of functions such as the Plasma, account abstraction and stateless clients.V神个人以太坊地址.png

Vitalik Buterin Personal Ethereum Address

Vitalik Buterin's "Pride"

What does the Casper Consensus mean for Ethereum? From the remarks of its founder Vitalik Buterin (founder of Ethereum), conclusions can be drawn.

In his personal tweet, the top content is to remind everyone to guard against the fraud of the Ethereum.

In addition, he also said that digital currency may return to zero at any time, and that the project party that advises to make money should not show off wealth.

In an interview with "Wang Feng Shi Wen", Vitalik said that Ethereum is no longer so dependent on Bitcoin, and he also believes that the exchange should go to hell.

In summary, Vitalik means that I hope that Ethereum can live independently, without being affected by other factors such as bitcoin and currency. Casper is the beginning of all this.

POS not only makes Ethereum different from Bitcoin in its fundamental consensus mechanism, but more importantly, it is efficient, which makes Ethereum, a digital asset, have the possibility of anchoring the application of the real industry. It is embedded in the real economy.

When Ethereum has physical assets and liabilities as an endorsement, it has no essential difference from legal tender.

The POS makes it necessary to buy a lot of Ethereum coins and lock them before they want to participate in the bookkeeping. Objectively, the lockout will bring the price of the Ethereum to a new height.

If the Ethereum price exceeds Bitcoin, or will completely get rid of the "shadow" of Bitcoin, its price is not affected by the rise and fall of Bitcoin.

Currently, the details of Casper CBC are still under discussion and the entire network is expected to be deployed in 2019. Vitalik, who has experienced The DAO hacking incident, is significantly more cautious than before.

He created the prosperity of the coin circle. This is his "pride". He does not want his "proud" to die easily.

Copy the following link to register for the HuobiPro account:
https://www.huobi.br.com/zh-cn/topic/invited/?invite_code=qazb3

Reference materials:

1.https://ethfans.org/ajian1984/articles/Ethereum-Sharding-Concept-20171203-Shenzhen

2.ethereum/sharding
https://github.com/ethereum/sharding/blob/develop/docs/doc.md

3.Bitcoin: A Peer-to-PeerElectronic Cash System
https://bitcoincore.org/bitcoin.pdf

4.Next-Generation Smart Contractand Decentralized Application Platform
https://github.com/ethereum/wiki/wiki/White-Paper

5.Ethereum Casper 101
https://medium.com/@jonchoi/ethereum-casper-101-7a851a4f1eb0