The Ethereum ecosystem will continue its ongoing metamorphosis as the long-awaited Shanghai update approaches. The latest outstanding blockchain smart contract protocol enhancement activates Ether (ETH) payouts from Ethereum’s Beacon Chain.
The merger marked a significant milestone for the Ethereum network in 2022 as the blockchain platform moved from a proof-of-work consensus to a proof-of-stake consensus. This change introduced validators as the new “miners” of the network, and ETH staking became a key element of network maintenance.
While full validators had to stake 32 ETH in order to process transactions and add new blocks to the network, the wider ecosystem could bet smaller amounts of ETH to get a share of the rewards – much like an investor who puts capital into interest-bearing accounts.
Those who locked ETH to become validators were unable to withdraw their stakes from Beacon Chain. This changes with the Shanghai update and is the main reason for the increased publicity surrounding the recent change to the Ethereum network.
The Shanghai update includes several Ethereum (EIP) improvement proposals in addition to activating staking payouts. Cointelegraph reached out to ConsenSys team members, the Ethereum Foundation, and analytics firm Nansen to unravel all aspects of the upcoming milestone.
Capella x Shanghai = Shapella
The upcoming changes include two simultaneous updates combined to cover all aspects of the update.
Shanghai refers to changes in the execution layer of Ethereum, mainly allowing staking ETH to be deposited in execution layer wallets. The Shanghai upgrade requires a simultaneous change to the Beacon Chain, which has been named Capella.
Justin Florentine, Human Protocol Engineer at ConsenSys’ Hyperledger-Besu, further explained the combined improvements in the execution and consensus layers:
“It is doubly named because it is the first simultaneous update of Ethereum’s execution layer and consensus layer, and is highly anticipated as it will enable stacked ETH withdrawals.”
In the Ethereum ecosystem, execution layer updates are named after cities where Devcon events took place, while consensus layer updates are named after stars. Therefore, the technical name of the upcoming update is Shapella, combining Shanghai and Capella.
Nevertheless, given the push to activate stacked ETH withdrawals, the broader cryptocurrency ecosystem refers to the upcoming update as Shanghai. As Beiko explained, Shanghai closes an important chapter in the evolution of Ethereum:
“It’s better to think of Shanghai as ‘merger completion’ than future upgrades. We did not implement payouts during the merger as this update was already the most complex in Ethereum history.”
Shanghai in a nutshell
As pointed out by several Ethereum analysts and developers, Shanghai has five EIPs. EIP-4895 will allow users to opt out of an Ethereum staking deal that was previously blocked.
Reward payouts will be automatically sent to payout addresses at regular intervals to validators. Users also have the option to exit staking altogether, which will return the entire validator balance.
Shanghai’s Ethereum upgrade will unlock 17.6 million 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 the weight of the validator on the network.
EIP-3651, EIP-3855, EIP-3860 and EIP-6049 are the next four elements of network modernization. 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 the number of units of work that a function will require from a computer on the network. Changes in the cost of Ethereum gas often adjust to correct for overpriced or underestimated operations where the central units perform less or more work than anticipated. According to Nelson, warm coin base (3651), PUSH0 (3855) and initcode changes (3860) are part of these fixes.
EIP-3651 changes the price of access to the coin base address of the validator that transmits and executes transactions. Validators receive fees to their coinbase address for maintaining the network. As summarized by Nelson, the EIP-3651 aims to reduce the gas costs associated with accessing the coin base address so that users submitting transactions can pay directly to validators under certain conditions:
“Regardless, this EIP corrects a previous oversight regarding the cost of accessing the coinbase address and provides additional benefits to users and developers who open up new use cases.”
The EIP-3860 will have a similar effect. Developers upload the initcode to the web when deploying a new smart contract. After the initcode is executed, the smart contract “bytecode” is created on the chain, run every time the contract is called, and also launches decentralized applications (DApps).
The initcode metering is intended to correct the cost of gas required by network nodes to process and implement smart contracts specified in the initcode. Validating nodes are currently checking that contracts are valid on deployment, which costs time and fuel to improve the EIP initcode as explained by Nelson:
“The EIP-3860 applies a new cost to the initcode that scales in correlation with the size of the initcode to ensure that contract creation is properly priced.”
Finally, EIP-3855 makes a “simple and simple change” to the Ethereum Virtual Machine (EVM) and gas costs. The current state of the EVM does not store a value of zero on the execution stack cheaply, and programmers have to use the “expensive” PUSH1 operation to set the value to zero.
Nelson pointed out that in this case, gas costs are directly related to storage space, meaning that EVM only needs 1 byte to write a single zero, while more than 1 byte is needed to write more from PUSH1 operations:
“This change creates a new PUSH0 opcode that costs 1 byte of data storage (less than PUSH1) and will reduce gas costs for developers (and ultimately users).
Beiko also reiterated that the EIP Ethereum Virtual Machine Object Format, which was initially included in the Shanghai update, has been removed from the event.
What to expect
The impact of the Shanghai update on cryptocurrency markets and the value of ETH is another big question that is perhaps harder to answer.
Andrew Thurman, an analyst at blockchain analytics platform Nansen, told Cointelegraph that the update will have significant implications for ETH supply flows and price, given that staking is fundamentally changing the structure of the Ethereum market:
“Some believe that a successful grid upgrade will spur more deposits, leading to bullish market activity. Others, meanwhile, believe that a large portion of the ETH staked stock – currently in excess of 17.5 million ETH – will be withdrawn and sold.”
Simon Dudley, Senior Blockchain Protocol Engineer at ConsenSys, summarized the shift in focus as part of the Shanghai update to prioritize validator rollbacks. This meant that the implementation of some EPIs was postponed to limit the risk of further delays in the upcoming update:
“Because of this, there was a strong desire among the core developers to ensure that the Shanghai update didn’t become too complicated.”
Many of these EIPs have been pushed back to the Cancun update that will precede Shanghai later in 2023. This includes improvements that will lay the groundwork for sharding, namely “Proto-Danksharding” EIP-4844.
Dudley noted that Shanghai deliberately excluded basic sharding work, but work on EIP-4844 continued in parallel. He also acknowledges that Shanghai’s deployment may have an impact on ongoing sharding work in the coming months:
“Shipping an update out of Shanghai may have an impact on sharding as it allows developers who worked on Shanghai to focus on a more complicated series of sharding updates known as The Surge.”
The Shanghai update is scheduled to take place on the Ethereum mainnet in early April. The original date was pushed back from March 2023, when the Goerli testnet – which allows development testing before mainnet deployment – performed the Shapell update on March 14.