The Ethereum network will undergo a scheduled upgrade in block number 7,280,000which is expected to occur Thursday, February 28, 2019. The exact date is subject to change based on blackout times between now and then and could go live 1-2 days earlier or later. A countdown timer can be seen on https://amberdata.io/blocks/7280000. You can monitor the network update in real time in http://forkmon.ethdevops.io/.
What is Constantinople and Saint Petersburg?
Constantinople and Saint Petersburg are the names given to this network update. Previous network updates have been called by other names, such as spurious dragon Y Byzantium. The reason why this network update has two names is because the original Constantinople network upgrade was postponed and two protocol updates on the same block number will be needed to fix issues on various Ethereum testnets such as Ropsten.
As an Ethereum user or Ethereum holder, is there anything I need to do?
If you use an exchange (like Coinbase, Kraken, or Binance), a web wallet service (like Metamask, MyCrypto, or MyEtherWallet), a mobile wallet service (like Coinbase Wallet, Status.im, or Trust Wallet), or a hardware wallet (such as Ledger, Trezor, or KeepKey), you don’t need to do anything unless your exchange or wallet service tells you to take further steps.
As a miner or node operator, what should I do?
Download the latest version of your Ethereum client:
What happens if I am a miner or node operator and I don’t participate in the upgrade?
If you are using an Ethereum client that is not updated to the latest version (mentioned above), your client will sync with the pre-network update blockchain once the update occurs. You will be stuck in an incompatible chain following the above rules and will not be able to send ether or trade on the Ethereum network post-update.
What is a network upgrade in Ethereum-land?
A network upgrade is a change to the underlying Ethereum protocol, which creates new rules to improve the system. The decentralized nature of blockchain systems makes upgrading the network more difficult. Network upgrades on a blockchain require cooperation and communication with the community as well as the developers of the various Ethereum clients in order for the transition to go smoothly.
What happens during a network update?
Once the community agrees on what changes should be included in the update, the protocol changes are written to the various Ethereum clients such as geth, Parity, and Harmony. Protocol changes are triggered on a specific block number. Any nodes that have not updated to the new rule set will be left in the old chain where the old rules will still exist.
What changes are taking place in Constantinople?
The changes that are implemented in Constantinople are defined by EIP. Ethereum Improvement Proposals (EIPs) describe the standards for the Ethereum platform, including core protocol specifications, client APIs, and contract standards. The following EIPs will be implemented in Constantinople.
EIP 145: Bitwise Shift Instructions in EVM
-
It provides native bitwise shift at a cost similar to that of other arithmetic operations.
-
EVM lacks bitwise shift operators, but supports other logical and arithmetic operators. Shift operations can be implemented through arithmetic operators, but that comes at a higher cost and requires more processing time. Implementing SHL and SHR using arithmetic each cost 35 gas, while these proposed instructions take 3 gas.
-
In short: This EIP adds native functionality to the protocol to make it cheaper and easier to do certain things on-chain.
EIP 1014: Skinny CREATE2
-
Add a new opcode at 0xf5, which takes 4 stack arguments: envelope, memory_start, memory_length, salt. Behaves identically to CREATE, except that it uses keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))(12:) instead of keccak256(RLP(sender_address, nonce))(12:) as the address where the contract is initialized at.
-
This allows interactions with addresses that do not yet exist in the chain, but can be trusted to possibly only contain code that was eventually created by a particular piece of startup code.
-
Important for state channel use cases that involve counterfactual interactions with contracts.
-
In short: This EIP makes it so that you can interact with addresses that haven’t been created yet.
EIP 1052: EXTCODEHASH opcode
-
This EIP specifies a new opcode, which returns the keccak256 hash of a contract code.
-
Many contracts need to perform checks on the bytecode of a contract, but they don’t necessarily need the bytecode itself. For example, a contract may want to check if another contract’s bytecode is one of a set of allowed implementations, or it may perform parsing on the code and whitelist any contract with the matching bytecode if the parsing passes. .
-
Currently, contracts can do this using the EXTCODECOPY opcode, but this is expensive, especially for large contracts, in cases where only the hash is required. As a result, a new opcode called EXTCODEHASH is being implemented that returns the keccak256 hash of a contract’s bytecode.
-
In short: This EIP makes it cheaper (less gas needed) to do certain things on-chain.
EIP 1234: Constantinople difficulty bomb delay and block reward adjustment
-
Average block times are increasing due to the slowly accelerating difficulty bomb (also known as the “ice age”). This EIP proposes to delay the difficulty bomb for approximately 12 months and reduce block rewards to adjust for the ice age delay.
-
In short: This EIP makes sure not to freeze the blockchain before proof-of-stake is ready and implemented.
What changes are taking place in Saint Petersburg?
Before Ethereum makes network updates to the mainnet, testnets such as Ropsten are updated to test the changes. The original Constantinople changes, listed in this blog post, were applied to test networks prior to the rollover and require a second network update to revert the original Constantinople changes. This is called Saint Petersburg and it happens in the same block number as Constantinople.
The following EIP was removed from the testnets by the St. Petersburg network update:
REMOVE EIP 1283: Net Gas Measurement for SSTORE without Dirty Maps
Thanks!
A big thank you to the Ethereum community and all Ethereum developers across all clients and platforms who came together to provide feedback, ideas, and contributions. Special thanks to Reddit user cartercarlson who allowed us to use his reddit post and the My Crypto team that let us use their “Ethereum Constantinople: everything you need to know“Medium post.
DISCLAIMER: It is an emerging and evolving highly technical space. If you choose to implement the recommendations in this post and continue to participate, you should make sure you understand how it affects you. You should understand that there are risks involved, including, but not limited to, risks such as unexpected errors. By choosing to implement these recommendations, you alone assume the risks of the consequences. This publication and recommendations are not a sale of any kind and do not create warranties of any kind, including, but not limited to, those relating to the Ethereum network or the Ethereum clients referenced herein.