The Ethereum ecosystem will continue its ongoing metamorphosis as the highly anticipated Shanghai upgrade approaches. The latest preeminent upgrade to the smart contract blockchain protocol will enable withdrawals of Ether (ETH) from the Ethereum Beacon Chain.
The merger marked a significant milestone for the Ethereum network in 2022, with the blockchain platform shifting from proof-of-work to proof-of-stake consensus. That change introduced validators as the new “miners” of the network, and ETH staking became a key component in maintaining the network.
While full validators were required to stake 32 ETH to process transactions and add new blocks to the network, the broader ecosystem could stake smaller amounts of ETH to get a share of the rewards, much like an investor putting capital into accounts that accrue interest.
Those who locked ETH to become validators were unable to withdraw their holdings on the Beacon Chain. This changes with the Shanghai update and is one of the main reasons for the increased fanfare around the latest change on the Ethereum network.
The Shanghai update features a handful of Ethereum Improvement Proposals (EIPs) in addition to triggering withdrawals. Cointelegraph reached out to team members from ConsenSys, the Ethereum Foundation, and analytics firm Nansen to break down all aspects of the upcoming milestone.
Capella x Shanghai = Shapella
the next changes characteristic two concurrent updates merged to cover all facets of the update.
Shanghai is referring to changes to the execution layer of Ethereum, primarily allowing staked ETH to be deposited into execution layer wallets. The Shanghai update requires a concurrent switch to the Beacon Chain, which has been dubbed Capella.
Justin Florentine, a protocol engineer on ConsenSys’ Hyperledger-Besu staff, further explained the combined updates to the execution and consensus layers:
“It has a double name because it is the first simultaneous upgrade of Ethereum’s execution layer and consensus layer, and it is highly anticipated because it will allow staked ETH withdrawals.”
Within the Ethereum ecosystem, execution layer updates are named after cities that have hosted Devcon events, while consensus layer updates are named after stars. Therefore, the technical name of the upcoming update is Shapella, which combines Shanghai and Capella.
However, given the focus on triggering staked ETH withdrawals, the impending upgrade is referred to as Shanghai by the broader cryptocurrency ecosystem. As Beiko explained, Shanghai closes an important chapter in the evolution of Ethereum:
“It’s better to think of Shanghai as ‘finishing the Merger’ than future updates. We did not introduce withdrawals during the merger because that upgrade was already the most complex in Ethereum’s history.”
Shanghai in a nutshell
As several Ethereum analysts and developers have highlighted, Shanghai has five EIPs. EIP-4895 will allow users to withdraw from the Ethereum share contract, which had previously been locked.
Reward payments will be automatically sent to withdrawal addresses at regular intervals to validators. Users also have the option to opt out of staking entirely, which will return their entire validator balance to them.
The Ethereum Shanghai upgrade will unlock 17.6 million ETH or more than $28 billion. https://t.co/qt8K4Zn55y
— Cointelegraph (@Cointelegraph) March 2, 2023
Validator balances are capped at 32 ETH, which means that balances above this threshold as a result of rewards do not contribute to the principal amount or increase a validator’s weight in the network.
EIP-3651, EIP-3855, EIP-3860 and EIP-6049 are the other four items of the network upgrade. Matt Nelson, Senior Product Manager for ConsenSys Hyperledger Besu and Web3, highlighted the impact of each of these EIPs.
The Ethereum protocol prices gas based on how many units of work a computer function on the network will require. Changes in Ethereum gas costs are often adjusted to correct for overvalued or undervalued operations that have central processing units doing more or less work than anticipated. Warm coinbase (3651), PUSH0 (3855), and startup code changes (3860) are part of these fixes, according to Nelson.
EIP-3651 changes the price of accessing the coinbase address of a validator that sends and executes transactions. Validators receive fees in their coinbase address for maintaining the network. As summarized by Nelson, EIP-3651 seeks to reduce the cost of gas to access a coinbase address so that users submitting transactions can pay validators directly under specified conditions:
“Regardless, this EIP fixes a previous oversight about the cost of accessing the coinbase address and brings some additional benefits to users and developers opening up new use cases.”
EIP-3860 will have a similar effect. Developers send the startup code to the network when they implement a new smart contract. When the startup code is executed, a smart contract “bytecode” is created on the chain, which is executed every time the contract is called and also runs decentralized applications (DApps).
The metering startup code is intended to correct the cost of gas required for the network nodes to process and deploy the smart contracts specified in the startup code. Validation nodes currently verify that contracts are valid at deployment time, which costs time and fuel to complete, which the EIP startup code aims to improve as Nelson explained:
“EIP-3860 applies a new cost to the start code that scales in correlation to the size of the ‘start code’ to ensure that contract creation handling is cost-effective.”
Lastly, EIP-3855 performs a “simple direct change” to the Ethereum Virtual Machine (EVM) and gas cost. The current state of EVM does not store a value of zero on the execution stack cheaply, and developers have to use the “expensive” PUSH1 operation to set a value to zero.
Nelson noted that gas costs are directly related to storage space in this case, which means that EVM only needs 1 byte to store a single zero, while more than 1 byte is required to store a larger number of the operation. PUSH1:
“This change creates a new opcode PUSH0, which costs 1 byte of data storage (less than PUSH1), and will reduce gas costs for developers (and ultimately users).”
Beiko also reiterated that the Ethereum VM Object Format EIPs initially included in the Shanghai update were removed from the event.
what to expect
The effect of the Shanghai update on the cryptocurrency markets and the value of ETH is another pertinent question that is perhaps more difficult to answer.
Andrew Thurman, an analyst at blockchain analytics platform Nansen, told Cointelegraph that the update would have significant ramifications for ETH’s supply flows and price, as the restaking creates fundamental changes to Ethereum’s market structure. :
“Some believe that a successful network upgrade will generate more deposits, which would lead to bullish market activity. Meanwhile, others believe that a large part of the staked ETH supply, which is now over 17.5 million ETH, will be withdrawn and sold.”
Simon Dudley, Senior Blockchain Protocol Engineer at ConsenSys, outlined a change in approach for the Shanghai update to prioritize validator removals. This meant that the implementation of certain EIPs was pushed further back on schedule to limit the risks of further delays in the next update:
“For this reason, there was a strong desire among core developers to prevent the Shanghai update from becoming too complicated.”
Several of these EIPs have been delayed until the Cancun update, which will follow Shanghai later in 2023. This includes enhancements that will lay the groundwork for sharding, namely “Proto-Danksharding” EIP-4844.
Dudley noted that Shanghai intentionally excluded fundamental fragmentation work, but work on EIP-4844 has continued in parallel. He also admits that the Shanghai deployment may well influence the ongoing work on fragmentation in the coming months:
“Shipping the Shanghai update can have an impact on sharding because it frees up developers who were working in Shanghai to focus on the more complicated series of sharding updates, known as ‘The Surge.'”
The Shanghai update is scheduled for early April on the Ethereum mainnet. The original date has been pushed back from March 2023, with the Goerli testnet, which allows for development testing before mainnet deployments. performing the Shapella update March 14.