The Ethereum ecosystem will continue its current metamorphosis as the long-awaited Shanghai update approaches. The latest preeminent upgrade to the smart contract blockchain protocol will trigger withdrawals of Ether (ETH) from the Ethereum Beacon Chain.
The Merge marked a major milestone for the Ethereum network in 2022, as the blockchain platform transitioned from proof-of-work to proof-of-stake consensus. This change introduced validators as the new “miners” of the network, and ETH staking became a key component of network maintenance.
While full-fledged validators were required to lock 32 ETH to process transactions and add new blocks to the network, the broader ecosystem could lock smaller amounts of ETH to earn a share of the rewards, much like an investor depositing capital in interest-bearing accounts.
Those who locked ETH to become validators have been unable to withdraw their holdings deposited on the Beacon Chain. This changes with the Shanghai update, and is one of the main reasons for the growing hype around the latest change to the Ethereum network.
The Shanghai update includes a handful of Ethereum Improvement Proposals (EIPs), as well as triggering withdrawals of locked funds. Cointelegraph reached out to team members from ConsenSys, the Ethereum Foundation, and analytics firm Nansen to unravel all aspects of the upcoming milestone.
Capella x Shanghai = Shapella
Upcoming changes include two concurrent updates amalgamated to cover all facets of the update.
Shanghai is referring to changes to the execution layer of Ethereum, which primarily allow locked ETH to be deposited into execution layer wallets. The Shanghai update requires a simultaneous change to the Beacon Chain, which has been dubbed Capella.
Justin Florentine, ConsenSys’ Hyperledger-Besu Protocol Engineer, explained the combined improvements in the execution and consensus layers:
“Its name is double because it is the first simultaneous upgrade of Ethereum’s execution layer and consensus layer, and it is highly anticipated because it will allow locked ETH to be withdrawn.”
In the Ethereum ecosystem, updates to the execution layer are named after cities that have hosted Devcon events, while updates to the consensus layer are named after stars. Therefore, the technical name of the upcoming update is Shapella, which combines Shanghai and Capella.
However, since it is focused on triggering withdrawals of locked ETH tokens, the impending upgrade is referred to as Shanghai by the cryptocurrency ecosystem at large. As Beiko explained, Shanghai closes an important chapter in the evolution of Ethereum:
“It’s better to think of Shanghai as ‘completion of The Merge’ than in relation to future upgrades. We didn’t introduce withdrawals during The Merge 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 staking contract, which was locked up until now.
Reward payments will automatically be sent to withdrawal addresses at regular intervals to validators. Users also have the option to withdraw completely, which will return their entire validator balance.
Ethereum’s Shanghai upgrade will unlock 17.6M ETH or over $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.
The EIP-3651, EIP-3855, EIP-3860 and EIP-6049 are the other four elements 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 sets gas prices 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 over or under priced operations where central processing units do more or less work than expected. Warm coinbase (3651), PUSH0 (3855), and initcode changes (3860) are part of these fixes, according to Nelson.
The EIP-3651 modifies the price of access to the coinbase address of a validator that sends and executes transactions. Validators receive commissions on their coinbase address for maintaining the network. As summarized by Nelson, EIP-3651 is intended to reduce the gas cost of accessing a coinbase address so that users submitting transactions can pay validators directly under specified conditions:
“Regardless, this EIP corrects a previous oversight about the cost of accessing the coinbase address and offers some added benefits to users and developers that open up new use cases.”
The EIP-3860 will have a similar effect. Developers send initcode to the network when they deploy a new smart contract. When the initcode is executed, an on-chain smart contract bytecode is created and executed every time the contract is called and decentralized applications (DApps) are executed.
Metering initcode is intended to correct the cost of gas required for network nodes to process and deploy the smart contracts specified in the initcode. Currently, validation nodes check that contracts are valid at the time of deployment, which costs time and gas, something that the EIP initcode aims to improve, as Nelson explained:
“EIP-3860 applies a new cost to the initcode that scales in correlation with the size of the `initcode` to ensure management that contract creation is costed appropriately.”
Finally, the EIP-3855 performs a “straight forward switch” on the Ethereum Virtual Machine (EVM) and gas cost calculation. The current state of the 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 pointed out that gas costs are directly related to storage space in this case, which means that the EVM only needs 1 byte to store a single zero, while more than 1 byte is needed to store a number larger than the PUSH1 operation:
“This change creates a new PUSH0 opcode, which costs 1 byte of data storage (less than PUSH1), and will lower gas costs for developers (and ultimately users).”
Beiko also reiterated that the Ethereum virtual machine object format EIPs initially included in the Shanghai update have been removed.
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 upgrade would have significant ramifications for ETH’s supply flows and price, as staking creates fundamental changes to Ethereum’s market structure:
“Some believe that a successful network upgrade will stimulate more deposits, leading to bullish market activity. Others, for their part, believe that much of the locked ETH supply – now exceeding 17.5 million ETH – It will be withdrawn and sold.”
Simon Dudley, ConsenSys’ chief engineer for blockchain protocols, outlined a shift in approach in the Shanghai update to prioritize validator removals. This meant that the implementation of certain EIPs was moved later in the update schedule to limit the risks of further delays in the next update:
“For this reason, there was a strong desire among core developers to avoid making the Shanghai Update overly complicated.”
Several of these EIPs have been delayed until the Cancun update, which will precede Shanghai in late 2023. This includes improvements that will lay the foundation for sharding, specifically EIP-4844 “Proto-Danksharding”.
Dudley noted that Shanghai was intentionally excluding the foundational fragmentation work, but that work on EIP-4844 has continued in parallel. He also admits that the Shanghai deployment may influence the ongoing work on fragmentation in the coming months:
“The implementation of the Shanghai Update may 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 was pushed back from March 2023, and the Goerli testnet – which allows development testing before mainnet deployment – carried out the Shapella update on March 14.
Clarification: The information and/or opinions expressed in this article do not necessarily represent the views or editorial line of Cointelegraph. The information presented here should not be taken as financial advice or investment recommendation. All investment and commercial movement involve risks and it is the responsibility of each person to do their due research before making an investment decision.