Next stop Shanghai — Ethereum’s latest milestone approaches

The Ethereum ecosystem will continue its ongoing metamorphosis as the much-anticipated Shanghai upgrade draws closer. The latest outstanding improvement in 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 as the blockchain platform shifted from proof-of-work to proof-of-stake consensus. This change introduced validators as the new “miners” of the network, with staking of ETH becoming a key component in maintaining the network.

While full validators had to stake 32 ETH to process transactions and add new blocks to the network, the broader ecosystem was able to stake smaller amounts of ETH to earn a portion of the rewards – much like an investor depositing capital into interest-bearing accounts.

Those who blocked ETH to become validators were unable to withdraw their staking holdings from the Beacon chain. This is changing with the Shanghai upgrade and is a key reason behind the increasing excitement surrounding the recent change to the Ethereum network.

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

Capella x Shanghai = Shapella

The upcoming changes include two simultaneous upgrades that will be merged to encompass all facets of the upgrade.

Shanghai refers to changes to Ethereum’s execution layer, mainly allowing staked ETH to be deposited in execution layer wallets. The Shanghai upgrade requires a concurrent change to the Beacon Chain, christened Capella.

Justin Florentine, a staff protocol engineer for ConsenSys’ Hyperledger visits, further explained the combined execution and consensus level upgrades:

“It is doubly named because it is the first simultaneous upgrade of Ethereum’s execution and consensus layers, and is highly anticipated because it will enable ETH withdrawals with staking.”

Within the Ethereum ecosystem, execution level upgrades are named after cities that have hosted Devcon events, while consensus level upgrades are named after stars. Hence the technical name of the upcoming upgrade is Shapella, a combination of Shanghai and Capella.

However, given the focus on enabling ETH-stacked withdrawals, the broader cryptocurrency ecosystem is dubbing the upcoming upgrade as Shanghai. As Beiko explained, Shanghai is closing an important chapter in the development of Ethereum:

“It’s better to think of Shanghai as ‘end of merger’ than to refer to future upgrades. We did not introduce withdrawals during the merger because this upgrade was already the most complex in Ethereum history.”

Shanghai explained in a nutshell

As pointed out by several analysts and Ethereum developers, there are five EIPs in Shanghai. EIP-4895 will allow users to withdraw from the previously suspended Ethereum staking contract.

Reward payments are automatically sent to validators at payout addresses on a regular basis. Users also have the option to stop staking entirely, which will return their entire validator balance.

Validator balances are capped at 32 ETH, meaning that balances above this threshold will neither contribute to the principal amount nor increase a validator’s weight in the network due to rewards.

EIP-3651, EIP-3855, EIP-3860 and EIP-6049 are the other four items of network upgrade. Matt Nelson, ConsenSys Hyperledger Besu and Web3 Senior Product Manager, highlighted the impact of each of these EIPs.

The Ethereum protocol calculates gas prices based on how many units of work a function requires from a computer on the network. Ethereum gas cost changes often adjust to correct overpriced or underpriced operations, where central processing units are doing more or less work than expected. Warm Coinbase (3651), PUSH0 (3855), and the initcode changes (3860) are part of these fixes, according to Nelson.

EIP-3651 changes the price of access to a validator’s Coinbase address that submits and executes transactions. Validators receive fees to their Coinbase address for maintaining the network. As Nelson summarized, EIP-3651 seeks to reduce the gas cost of accessing a Coinbase address, allowing users submitting transactions to pay validators directly under certain conditions:

“Separately, this EIP corrects a previous oversight about the cost of accessing the Coinbase address and provides users and developers with some additional benefits that open up new use cases.”

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

Metering Initcode intends to correct the gas costs required for network nodes to process and deploy the smart contracts specified in the initcode. Validation nodes are currently checking that contracts are valid upon deployment, which takes time and gas to complete, which aims to improve the initcode EIP, as Nelson explained:

“EIP-3860 applies a new cost to the initcode that is scaled in correlation to the size of the ‘initcode’ to ensure that the contract creation incurs a reasonable cost.”

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

Nelson emphasized that the gas cost in this case is directly related to storage space, meaning the EVM only needs 1 byte to store a single zero, while more than 1 byte is needed to pull a larger number from the PUSH1 save operation:

“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 Ethereum Virtual Machine object format EIPs originally included in the Shanghai upgrade were removed from the event.

What to expect

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

Andrew Thurman, an analyst at blockchain analytics platform Nansen, told Cointelegraph that the upgrade would have a significant impact on ETH’s supply streams and price, as staking is causing fundamental shifts in Ethereum’s market structure:

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

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

“Because of this, there was a strong desire among the core developers to prevent the Shanghai upgrade from becoming too complicated.”

Several of these EIPs have been deferred to the Cancun upgrade, which will follow Shanghai later in 2023. These include improvements that will form the basis for sharding, namely “Proto-thanksharding” EIP-4844.

Dudley noted that Shanghai intentionally excluded foundational sharding work, but work on EIP-4844 was continuing in parallel. He also acknowledges that the Shanghai deployment could well influence ongoing work on sharding in the coming months:

“The delivery of the Shanghai upgrade may have an impact on sharding as developers who worked on Shanghai will have time to focus on the more complicated series of sharding upgrades known as ‘The Surge’.”

The Shanghai upgrade is set to take place on the Ethereum mainnet in early April. The original date was pushed back to March 2023, with the Goerli test network — which enables development testing before mainnet deployment — performing the Shapella upgrade on March 14.

Source

Leave a Reply

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