Interpretation of the four EIPs that will be activated in the upgrade of Ethereum Shanghai
After the upgrade of Ethereum Paris (merger, consensus to POS), another major update is coming—Shanghai upgrade! At present, the Ethereum core community with thousands of professional developers has undergone 15 mainnet upgrades in the past 15 years, and this Shanghai upgrade will provide unlocking capabilities for the 23 billion US dollars of POS pledged ETH locked on the chain. Accompanied by the integration of many EIPs optimized for GAS.
secondary title

1. Background
1.1 Mainnet upgrade
Ethereum proposed four major stages in 2015: frontier, homestead, metropolis, and tranquility. It is well known that the sign of the "tranquility" stage is that the consensus algorithm of Ethereum has completely changed from POW mining to POS equity pledge mining two months ago. Today, he is the chief executive who is energy-saving, safe and sufficiently decentralized public chain
secondary title
1.2 Review August 5, 2021 - London Upgrade
At block height 12,965,000, Ethereum completed a hard fork upgrade code-named "London", involving a total of five proposals
The most influential is the launch of EIP-1559, which was proposed by Vitalik Buterin, the founder of Ethereum. From then on, every transaction on Ethereum will burn the basic gas fee, which will automatically reduce the circulating supply of ETH, making Ethereum TokenEntering the era of deflation
give a chestnut
EIP-1559 has changed the calculation logic of the gas fee for the highest bidder. In the past, in order for miners to package their transactions in time, users had to increase the price to pay the miner’s fee. The higher the bid, the greater the probability of being packaged first, which will cause Unlimited growth of Gas fee
After the upgrade, the transaction fee is divided into a base fee and a tip. The tip encourages miners to bid for blocks, and the base fee will be destroyed. Although there is still part of bidding for blocks, miners’ income has dropped by about 20%, and the economic model has also turned into deflation
Essentially, the design of the 1559 playedAdvantages of the second price auctionfirst level title
2. Shanghai upgrade
Why the urgency?
In the past, it was common for major upgrades to be carried out only once a year or two. Heavyweight upgrades such as merged consensus conversions will only enter the mainnet upgrade after the stable operation of the testnet 1-2 years in advance. Why is this upgrade in Shanghai so urgent? Woolen cloth? What about the EIP that was basically finalized after only two months?
The core factor is that all transactions on the merged Ethereum network will no longer be verified by energy-intensive "miners", but by individual and organizational "validators" who have deposited or pledged large amounts of ETH. For verifiers, their pledged ETH can generate and collect new ETH, and these so-called "new ETH" are their rewards for verifying transactions and protecting the network.
But the current Ethereum,Can only deposit ETH but cannot withdraw ETH,The total value of pledges is close to $23.5 billion, all "trapped" on the Ethereum network.
first level title
3. Interpretation of details

secondary title
https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md
text
https://eips.ethereum.org/EIPS/eip-3651
what is he
The translation of this title is really confusing. The COINBASE here is not the company of the exchange, but comes from the concept of Bitcoin, that is, the first transaction in the block is a special transaction, called a coin transaction or Coinbase transaction, this kind of transaction was early designed for miners to package and collect gas tip income for mining.
Warm and cold actually refer to whether there is pre-loading when executing this transaction, which affects the gas fee for miners to package coinbase transactions
If there is no preload and it is cold, the gas cost is higher
text
What is the use?
Now the transactions packaged by miners may be used for more purposes. For example, ERC-4337 is used to collect user signatures and realize transactions in batches. Secondly, the same principle can also be used to realize meta-transaction payments with multiple tokens combined with logic.
Before EIP-3651, more incentives to pay with ETH
After EIP-3651, more incentives to use ERC20 payment methods
secondary title
text
https://eips.ethereum.org/EIPS/eip-3855
what is he
For EVM, that is, the Ethereum virtual machine (the system that executes the contract code), there are many kinds of instructions designed, but there is no design of push0, which is the operation instruction for pushing the value of 0 into the stack.
text
What is the use?
When there was no push0 originally, there were some operations that relied on 0 as an offset, such as remote call calls and returns, many parameters were 0. Originally, to operate 0, you could only use the instruction PUSH1 0 (that is, push a number, the number is 0), this operation will consume 3 gas, and then push1 and 0 each occupy a byte storage of the initialization code, resulting in a higher cost of deploying this contract by 2*200gas
The EIP also counts the resulting gas loss: in the existing account, 340,557,331 bytes are wasted on the PUSH1 00 instruction, which means that the deployment loss is 68,111,466,200 gas
secondary title
text
https://eips.ethereum.org/EIPS/eip-3860
what is he
text
What is the use?
Obviously, a larger code capacity allows the smart contract system to do more things. The current size of the code is only 24kb, which makes it difficult to implement the system with one contract. The original temporary solution is to deploy multiple contracts, and then mutually Call each other, but obviously cross-contract reference is a high gas cost.
secondary title
text
https://eips.ethereum.org/EIPS/eip-4895
what is he
It can be said that this is the core of this Shanghai upgrade. As a result, the pledged ETH withdrawal operation is implemented, and the implementation method is to introduce a system-level instruction withdrawal based on the information of the beacon chain (consensus layer), unconditionally and directly control the ETH balance of the specified address.
There are many ways to perform the withdrawal operation. The characteristics of this withdrawal operation are as follows
It is initiated by the system itself, not by a certain user, which is more concise and easy to review
There is no gas fee consumption, the system initiation is controlled by the withdrawal limit of the consensus layer, and there is no need to use gas for anti-dos protection
text
What is the use?
Don't forget, there are still 1400W,first level title
4 Where is the focus of the follow-up Ethereum?
appendix

appendix
https://www.youtube.com/watch?v=CcL9RJBljUs&t=336s
https://docs.google.com/presentation/d/1N6aX-GE-kus73vlq-v7D-z2iwUI4N4ss1tiPamfoTi4/edit#slide=id.g1231e3828e8_0_89
https://twitter.com/EthereumCN/status/1588825937629835265
Like and follow 14, bring you value from a technical perspective
Like and follow 14, bring you value from a technical perspective


