Next stop Shanghai — Ethereum’s latest milestone is approaching

The Ethereum ecosystem will continue its ongoing metamorphosis as the highly anticipated Shanghai Upgrade approaches. The latest prominent improvement to the smart contract blockchain protocol will enable Ether (ETH) withdrawals from Ethereum’s Beacon Chain.

The merger marked a significant milestone for the Ethereum network in 2022, with the blockchain platform moving from proof-of-work to proof-of-stake consensus. This change introduced validators as the new “miners” into the network, and staking of ETH became a key component in the maintenance of the network.

While full validators were required to stake 32 ETH to process transactions and add new blocks to the network, the wider ecosystem could stake smaller amounts of ETH to earn a portion of the rewards – much like an investor putting capital into interest-bearing accounts.

Those who locked ETH to become validators have not been able to withdraw their holdings from the Beacon Chain. This changes with the Shanghai upgrade, and is a major reason for the increased fanfare surrounding the latest change to the Ethereum network.

The Shanghai upgrade includes a handful of Ethereum Improvement Proposals (EIPs) in addition to enabling staking. Cointelegraph reached out to members of the ConsenSys team, the Ethereum Foundation and research firm Nansen to unpack all aspects of the upcoming milestone.

Capella x Shanghai = Capella

The upcoming changes have two concurrent upgrades merged to encompass all facets of the upgrade.

Shanghai refers to changes in Ethereum’s execution layer, which mainly allow depositing staked ETH to execution layer wallets. The Shanghai upgrade requires a simultaneous change to the Beacon Chain, which has been named Capella.

Justin Florentine, a staff protocol engineer for Hyperledger Besu at ConsenSys, further explained the combined upgrades in the execution and consensus layers:

“It is doubly named because it is the first simultaneous upgrade of Ethereum’s execution layer and consensus layer, and it is highly anticipated because it will enable the withdrawal of ETH at stake.”

Within the Ethereum ecosystem, execution layer upgrades are named after cities that have hosted Devcon events, while consensus layer upgrades are named after stars. Therefore, the upcoming upgrade’s technical name is Shapella, which combines Shanghai and Capella.

Nonetheless, given the focus on enabling ETH withdrawals, the broader cryptocurrency ecosystem is referring to the looming upgrade as Shanghai. As Beiko explained, Shanghai closes an important chapter in Ethereum’s evolution:

“It’s better to think of Shanghai as ‘completing the merge’ than related 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 has been highlighted by several analysts and Ethereum developers, Shanghai has five EIPs. EIP-4895 will enable users to withdraw from the Ethereum stake contract, which was previously locked.

Reward payments are automatically sent to withdrawal addresses periodically to validators. Users also have the option to exit the stake entirely, which will return the entire validator balance.

Validator balances are capped at 32 ETH, meaning that balances above this threshold as a result of rewards do not contribute to the principal amount or increase the weight of a validator on the network.

EIP-3651, EIP-3855, EIP-3860 and EIP-6049 are the other four items in the network upgrade. Matt Nelson, Hyperledger Besu and Web3 senior product manager at ConsenSys, highlighted the impact of each of these EIPs.

The Ethereum protocol prices gas based on how many units of work a function will require from a computer in the network. Changes in Ethereum’s gas costs often adjust to correct overpriced or underpriced operations that have central processing units doing more or less work than expected. Warm coin base (3651), PUSH0 (3855) and the initcode changes (3860) are part of these fixes, according to Nelson.

EIP-3651 changes the price to access the coin base address of a validator that submits and executes transactions. Validators receive fees to their coinbase address to maintain the network. As Nelson summarized, EIP-3651 appears to lower gas costs by gaining access to a coinbase address, allowing users submitting transactions to pay validators directly under specific conditions:

“Regardless, this EIP corrects a previous oversight on the cost of accessing the coinbase address and provides some additional benefits for users and developers that open up new use cases.”

EIP-3860 will have a similar effect. Developers submit initcode to the network when they deploy a new smart contract. When the initcode is executed, a smart contract “bytecode” is created in the chain, which runs every time the contract is called, and also runs decentralized applications (DApps).

The metering initcode intends to correct the gas costs required for network nodes to process and distribute the smart contracts specified in the initcode. Validating nodes currently check that contracts are valid upon deployment, which costs time and gas to complete, which initcode EIP aims to improve as Nelson explained:

“EIP-3860 uses a new cost on initcode that scales according to the size of the “initcode” to ensure handling that contract creation is costed correctly.”

Finally, EIP-3855 performs a “straightforward and simple change” of the Ethereum Virtual Machine (EVM) and gas cost. The current state of the EVM does not store a value of zero on the execution stack cheaply, with developers having to use the “expensive” PUSH1 operation to set a value to zero.

Nelson highlighted that gas costs are directly related to storage space in this case, meaning that the EVM only needs 1 byte to store a single zero, while more than 1 byte is required to store a larger number from the PUSH1 operation:

“This change creates a new PUSH0 opcode, which costs 1 byte of data storage (less than PUSH1), and will reduce gas costs for developers (and ultimately users).”

Beiko also reiterated that EIPs in Ethereum Virtual Machine object format that were originally included in the Shanghai upgrade have been removed from the event.

What to expect

The impact of the Shanghai upgrade on the cryptocurrency markets and the value of ETH is another pertinent question that may be more difficult to answer.

Michiel Milanovic, a DeFi market analyst at ConsenSys, weighed in on the expected effects that Shanghai will have in terms of market supply and value of ETH after the upgrade. Milanovic noted that validators are broadly categorized as short-term or long-term, with the current market split at 40/60 respectively, which allows for some simple predictions to be made:

“We see potential for an increase in the supply of ETH in circulation from long-term validators eager to withdraw their accumulated rewards.”

Milanovic also highlighted that the withdrawal mechanics are designed with a limit of 16 withdrawals per block and prioritize short-term validators. The likely result is that any market impact from long-term validators will be gradual.

Meanwhile, short-term validators are mostly run by liquid staking providers (LSPs), who are more incentivized to use rewards to spin up new validators. Milanovic said this is mainly due to an expected increase in demand when withdrawals are enabled, as it reduces the liquidity risk of staking ETH.

“We also expect to see more staked ETH tokens issued by these providers to be used across DeFi, which has so far been quite limited.”

Andrew Thurman, an analyst at blockchain analytics platform Nansen, told Cointelegraph that the upgrade would have significant implications for the supply flows and price of ETH, given that the effort creates fundamental changes in Ethereum’s market structure:

“Some believe that a successful network upgrade will spur more deposits, leading to bullish market activity. Others, meanwhile, believe that large portions of the ETH supply – now over 17.5 million ETH – will be withdrawn and sold.”

Simon Dudley, a senior blockchain protocol engineer from ConsenSys, summarized a shift in focus for the Shanghai upgrade to prioritize validator extraction. This meant that the implementation of certain EIPs was moved further down the timeline to limit the risk of further delays to the upcoming upgrade:

“For this reason, there was a strong desire among the core developers to prevent the Shanghai upgrade from becoming overly complicated.”

Several of these EIPs have been pushed back to the Cancun upgrade, which will follow Shanghai later in 2023. This includes improvements that will lay the foundation for sharding, namely “Proto-Danksharding” EIP-4844.

Dudley noted that Shanghai intentionally excluded basic cutting work, but work on EIP-4844 has continued in parallel. He also admits that the deployment of Shanghai may well affect the ongoing work on cutting in the coming months:

“Shipping the Shanghai upgrade could have an impact on sharding because it frees up developers who worked in Shanghai to focus on the more complicated series of sharding upgrades known as ‘The Surge’.”

The Shanghai upgrade is scheduled to take place on the Ethereum mainnet in early April. The original date was pushed back from March 2023, with the Goerli test network – which allows development testing prior to grid network deployment – ​​performing the Shapella upgrade on 14 March.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *