It is worth 90 billion yuan! A text to understand the upcoming Ethereum hard fork: Constantinople

time:2019-01-16 12:16:31

On December 8, 2018, the Ethereum core development team announced that it would agree on the hard fork fork activation time in Constantinople and use the 7.080000 block as the activation point, which is expected to be between January 14 and 18, 2019. online.

On January 11th, the Ethereum Foundation officially announced the announcement of the upgrade of Constantinople, announcing that the Ethereum network upgrade is expected to be January 16, 2019. Subsequently, dozens of exchanges such as the currency security, OKEx, and fire coins announced their support for the Ethereum Constantinople fork.

The hard fork of Constantinople is the most important version upgrade before Ethereum evolved into the "complete body". After that, Ethereum will enter an era.

However, the Ethereum official announcement on January 15th, because the Ethereum Constantinople code suddenly broke the "reentrant" vulnerability, the vulnerability can be used to attack related contracts to modify user balances or other key variables. In a cautious manner, Ethereum decided to postpone the hard-forked plan for Constantinople, which was scheduled to be activated in the 70,800,000 block, and the specific upgrade time will be selected on Friday's next core developer conference call. Ethereum core developer Afri Schoedon said on Twitter that the hard fork is expected to be held next Monday.

This time, the Ethereum hard fork upgrade is indeed full of twists and turns, but the coming will come. On the eve of this hard fork upgrade, Binyi Finance·Binary carefully arranged the process of upgrading Ethereum, and invited more practitioners and experts to interpret and bring you closer to the real “Constantinople”.



First, the upgrade of Ethereum

Ethereum development began at the end of 2013. In January 2014, founder Vitalik Buterin (V God) officially announced Ethereum at the North American Bitcoin Conference in Miami, Florida, USA.
As early as the design of Ethereum, the founders completed the route planning for the project development. In order to better serve the network's functions, Ethereum will undergo four major upgrades during the development process: Frontier, Homestead, Metropolis, and Serenity.

Network Test: Olympic Testnet

From the first half of 2014 to the first half of 2015, Ethereum was in the development and testing phase of the whole network. In May 2015, Ethereum launched the Olympic Testnet at the 9th proof of concept. The developer community is invited to participate in a network stress test, and users who hold various records or somehow destroy the Ethereum network system will receive generous rewards. This phase is very short, mainly to prepare for the formal entry into the first phase.

The first stage: Frontier

On July 30, 2015, Ethereum entered the first phase, the Frontier. This phase is primarily about running mining and exchange trading so that communities can run mining equipment and build an environment for testing distributed applications (DApps). At this stage, Ethereum only has a command line interface, no graphical interface, and needs to be very proficient in the entire Ethereum model. The tool mastery is very good to use.

It is worth noting that from this stage, the real Ethereum can be dug out, but the reward for each block is only 10% of the normal reward, that is, each block rewards 0.59 ETH. Moreover, due to the complexity of the Ethereum version at this stage, it is difficult for miners to participate in mining, and more involved in mining is the developer.

Second stage: Homestead

On March 14, 2016, Ethereum entered the second phase, Homestead, at a height of 1150000 at the main network block. This upgrade mainly includes several protocol changes: EIP-2 (main hard fork change), EIP-7 (Ethernet virtual machine update), EIP-8 (devp2p forward compatibility).

After the Ethereum optimization agreement, the system is more stable and easier to use, and ordinary users can also start to participate in mining. The reward for mining also recovered from the 10% of the “frontier” stage to the normal reward level, ie 5 ETHs were awarded for each block.

Phase III: Metropolis

This phase consists mainly of two hard fork upgrades: Byzantium and Constantinople. This phase is considered to be a transitional phase from the PoW mechanism to the PoS mechanism. The underlying protocol of Ethereum will undergo an important change, namely a hard fork upgrade.

The Byzantine hard fork upgrade has been upgraded at the height of the 473,000th block as originally planned. The Byzantine upgrade introduces a number of new features in the Ethereum network, including zk-Snarks, "revert function and returndata directives" (flexibility of smart contracts), and abstract accounts.

Currently, the entire Ethereum network is in the third phase – the Byzantium (byzantine version) of Metropolis, which is also on the eve of the hard fork upgrade of Constantinople.

The fourth stage: Serenity

After the upgrade of Constantinople, the next major upgrade will bring the entire Ethereum into a “quiet” phase, the final phase of the full implementation of the PoS mechanism.



Second, Constantinople hard fork upgrade


The purpose of the hard fork of Constantinople is clear – to solve the series of problems left by Byzantine forks, and to further improve the use of Ethereum. At the same time, this upgrade is also an important stage for the Ethereum network to transition from PoW to PoS.

Specifically, the hard fork upgrade of Constantinople is mainly reflected in the following aspects of the upgrade:

EIP145: Introduced the "Bitwise Shifting" operator. The Ethereum virtual machine (EVM) lacks this operator before, only supports other logic and arithmetic operators. The "bitwise move" operator can only be implemented by logical and arithmetic operators, and now supports "bitwise movement" operations through native support. , which greatly optimizes the consumption of Gas for DApp Developer Smart Contracts.

EIP1014: Ethereum founder Vitalik Buterin personally proposed; added a contract creation function CREATE2, which provides a contract creation method that can predict the contract address in advance, which can better support the expansion based on state channel or chain transaction. The solution is now the mainstream Layer 2 solution.

EIP1052: From Ethereum core developers Nick Johnson and Pawel Bylica; introduced a new opcode that allows direct return of the keccak256 hash of the contract bytecode, which effectively reduces the computational effort of the Ethereum network for large smart contracts Especially when only the hash value of the smart contract is needed.

EIP1234: This upgrade is mainly to reduce the existing block reward from 3 ETH to 2 ETH, reduce production by 33%, and delay the Difficulty Bomb by 12 months. This is the most controversial place in this upgrade.

EIP1283: This upgrade optimizes the price (Gas) of smart contract network storage by changing the SSTORE opcode to reduce the Gas consumption that does not match the smart contract run.

After the upgrade of the hard fork, there will be some most significant changes in the Ethereum network, including: one-year delay in the difficulty bomb, the reduction of block rewards from 3, 2, 30% reduction in ETH, etc., Gas consumption adjustment.



Third, the difficulty bomb and the "glacier era"


What is the controversial difficulty bomb in this upgrade?

In short, the difficulty bomb refers to the difficulty of calculating the mining, in addition to the adjustment according to the time of the block and the difficulty of the previous block, plus a difficulty factor for exponential growth per 100,000 blocks.

According to this calculation rule, as the height of the Ethereum block increases, the difficulty of the block will also increase greatly, and it will be difficult for the miners to dig out new blocks. The difficulty of mining is getting harder and harder. In the end, the miners can hardly produce new blocks by mining. At this time, it is called the stage of “glacier age”.

The difficulty bomb was added to prevent the miners from boycotting the conversion process from PoW to PoS. After adding the difficulty bomb, the miners will gradually find that transferring to the PoS mechanism is more beneficial to themselves in the miner process, so they will gradually abandon the PoW and complete the "moderate" transition of the entire network consensus mechanism.

But the reality is that the entire conversion process is much longer than the developers originally envisioned. At present, PoW is still the main mining mechanism of Ethereum, and due to the existence of difficulty bombs, the difficulty of mining continues to increase rapidly.

In order to ensure the smooth network and maintain the stability of the system, the difficulty bomb can only be delayed once and for all before the official launch of the PoS mechanism. The current implementation method is to calculate the difficulty of mining according to the level of 3 million block heights, and strive to maintain the average time of 15 seconds. Such a simple operation actually reduces the difficulty of mining ETH and increases the supply of ETH. The direct result is that ETH is inflated and the value is reduced.

To avoid this, the developer decided to reduce the rewards for each block to maintain the overall supply level of ETH. When the Byzantine upgrade, the previous five ETH normal block rewards were reduced to three, and this time the Constantinople upgrade further reduced the block reward from the previous three ETHs to two.

At the same time, due to the delay of the difficulty bomb, the arrival of the glacier era has also been postponed. After the escalation of Constantinople, the Glacier era was postponed for nearly 12 months.

The presence of difficulty bombs makes it difficult for miners to boycott during the upgrade, avoiding hard forks similar to previous ETCs. But it will also put a lot of pressure on Ethereum developers, because the development team must complete the transition from PoW to PoS before the arrival of the "glacier era" caused by the difficulty bomb.



Fourth, from PoW to PoS


Both PoW and PoS are a consensus mechanism for blockchains.

The difference is that the PoW mechanism requires miners (or nodes) to perform hash calculations by continuously consuming computational power to find the correct random number to obtain the accounting rights. For the PoW mechanism, computing power is the key.

The PoS mechanism determines the rights based on the number and timing of tokens held by the user. Participants in this mechanism are not miners but "verifiers." Realize your rights by requiring the verifier to bet on Ethereum in Ethereum. In the PoS mechanism, Token is the key.

Why does Ethereum always want to convert the PoW mechanism to the PoS mechanism?

First, solve the centralization problem of PoW's computing power. Whether it was the BCH fork event last year or the previous ETC suffered a 51% power attack, it illustrates the centralization of the PoW consensus mechanism. This will greatly reduce the security of the system.

Second, solve the energy consumption problem caused by the PoW mechanism. V God once said, “Even if you don’t think pollution and carbon dioxide are problems, huge energy waste does exist. Real consumers – the need for electricity for each of us is being replaced by Bitcoin.”

Because the PoW mechanism is highly dependent on computing power, it will cause a huge waste of energy, which is also a controversial place for Bitcoin. As far as Ethereum is concerned, for most of 2018, the amount of electricity used for mining is almost the same as that of “Iceland”. For v gods, cutting energy consumption has always been part of the Ethereum vision, and other supporters generally agree with this, and converting Ethereum's PoW to PoS is to achieve this vision. According to v God's estimation, turning to PoS will reduce the energy consumption of Ethereum transactions by more than 99%.

Wu Tong, dean of the Digital Economy Business School, also said that overall, POS is more energy efficient than POW, and the degree of consensus required is also higher. There is no problem in the general direction of POW evolution to POS. Although the current environment is difficult to completely detach from the POW, the future will still smoothly transition to pure POS. Perhaps in the process, the introduction of PoW and PoS will be a good choice.

Although many people in the industry also think that this is a better choice for Ethereum, this hard-fortunate upgrade of Constantinople does not introduce a hybrid mechanism of PoW and PoS. This is worth paying attention to.



Fifth, the impact of the hard fork upgrade of Constantinople


Will there be a fork?

MakerDao is one of the most active DApps in Ethereum. As the person in charge of the project in China, Pan Chao believes that this time, the fork can be easily understood as an upgrade for ordinary people. Because this is a hard-nosed hard fork, mainly to introduce the state channel, improve the gas cost of Ethereum and reduce the block reward.

Kraken Exchange announced in its announcement to support the upgrade of ETH Constantinople, also said that this will be an uncontroversial upgrade, ETH holders will not get new candy, because the old chain is expected to soon out-of-date.

How to affect the ETH price?

In the past month, two major factors have contributed to the short-term surge in ETH: oversold and the upcoming “Constantinople” hard fork upgrade.

According to Alex Kruger, an economist and cryptocurrency trader, the forthcoming Ethereum fork called Constantinople will increase demand for Ethereum. Because the fork will reduce the ETH block reward from 3 EWTH to 2.

Wu Tong also believes that the fork upgrade will greatly improve the performance of the Ethereum blockchain, and some major changes such as mining incentives mentioned in the Ethereum improvement proposal will also be implemented in this hard fork. This positive effect is also reflected to a certain extent in the previous price increase. However, he said, "After the upgrade, the price of ETH may drop slightly, and thus the value of ETH will be long-term."

What is the main impact on the mining circle?

In the view of a miner, this upgrade has reduced the block rewards, and in the case of not finding cheaper electricity to reduce costs, it has a great impact on those who mine in Ethereum. But at the moment, I will not choose to shut down, first dig and decide what to do. If the price of ETH rises, the impact of the upgrade can be reduced. Of course, you can also choose to dig other currencies, not yet to the point of shutdown.

Chen Lei, secretary-general of the blockchain club of Peking University and mine in Xinjiang, said that the ETH production cut caused by this upgrade may cause eth miners to shut down frequently, but overall, it can only affect two or three percent, in April. The flood season may be the key period. What is more worthy of attention is the Ethereum Developers Conference in the past few days, to make an amendment to the algorithm in Istanbul. At present, the possibility of the next fork change algorithm is very high, which will be a big blow to the Ethereum mining machine manufacturers, and the machines they are going to put in this area may be in their hands.

Will it be a public chain?