We have already written about the upcoming major update of the Ethereum network – Shanghai Upgrade. This is the first major network update after the recent The Merge – the complete transition of the Ethereum network to the Proof-of-Stake consensus mechanism. The Merge has increased the centralization of Ethereum, and the Shanghai Upgrade should fix it.
Ethereum Shanghai Network Update includes several Ethereum improvement proposals (EIP). In a previous article about this major update, we described the EIPs that will be included in the Shanghai Upgrade. Then it was planned to hold 6 EIPs: EIP-3540, EIP-3651, EIP-3670, EIP-3855, EIP-3860 and EIP-4895. These EIPs are described in detail in our previous article.
On the eighth of December, Ethereum Core Devs Meeting 151 was held, where the upcoming Shanghai Upgrade was discussed. The summary of this meeting was published by Ethereum developer Tim Beiko.
Three new EIPs have been added to the EIPs list: EIP-4200, EIP-4750 and EIP-5450. Let's discuss them in more detail.
This EIP adds three new EVM jump instructions: RJUMP, RJUMPI and RJUMPV. They are needed in order to optimize the network and reduce costs.
“A recurring discussion topic is that EVM only has a mechanism for dynamic jumps. They provide a very flexible architecture with only 2 (!) instructions. This flexibility comes at a cost however: it makes analysis of code more complicated and it also (partially) resulted in the need to have the JUMPDEST marker. <…> The main benefit of these instruction is reduced gas cost (both at deploy and execution time) and better analysis properties.”
This EIP, like the EIP-4200, is aimed at optimizing the code. Optimization is carried out by dividing the code into sections.
“Introduce the ability to have several code sections in EOF-formatted (EIP-3540) bytecode, each one representing a separate subroutine/function. Two new opcodes,CALLF and RETF, are introduced to call and return from such a function. Additionally JUMPF instruction is introduced to perform a jump to a function. Dynamic jump instructions are disallowed.”
This EIP introduces extended code validation. And, like the previous ones, optimizes the network.
“Currently existing EVM implementations perform a number of validity checks for each executed instruction, such as check for stack overflow/underflow, sufficient gas, etc. This change aims to minimize the number of such checks required at run-time, by verifying at deploy-time that no exceptional conditions can happen, and preventing to deploy the code where it could happen.”
At Ethereum Core Devs Meeting 151, the addition of two more EIPs was also discussed: EIP-663 and EIP-6064. EIP-663 Unlimited SWAP and DUP instructions introduce two new instructions: SWAPN and DUPN their difference from SWAP and DUP in increased stack depth from 16 to 256 elements. EIP-6046: Replace SELFDESTRUCT with DEACTIVATE introduces a change to SELFDESTRUCT instruction “to not delete all storage keys, and to use a special value in the account nonce to signal deactivated accounts.” Instruction SELFDESTRUCT is also renamed to DEACTIVATE.
The most interesting information voiced during the Ethereum Core Devs Meeting 151 is the deadline for Shanghai Upgrade. The developers called March 2023 the deadline for Shanghai hard fork. We hope that the developers will be able to carry out the next major network update without delays, and we continue to observe.