Written by: Vitalik Buterin summary
The EIPs that caused changes in gas costs in the Berlin hard fork are: EIP 2565 (reducing the gas cost of ModExp modular exponentiation operations), EIP 2929 (increasing the gas cost of SLOAD and CALL), and EIP 2718 and 2930, to support the compatibility of contracts affected by the increase in gas costs and pave the way for future upgrades. Currently, the most important of these EIPs is EIP-2929. Its core content is: the gas cost of SLOAD increases from 800 to 2100, the gas cost of CALL (including STATICCALL, DELEGATECALL and other opcodes) and external contract queries (BALANCE, EXTCODESIZE, etc.) increases from 700 to 2600, but this only happens when the address and storage slot are accessed for the first time in a transaction. The purpose of this is to further improve the ability to resist DoS attacks: early research showed that the biggest DoS vulnerability in the Ethereum protocol is in storage access, and it is possible to create some blocks that simply access a large number of accounts repeatedly, and the processing time may be as long as 80 seconds. The solution is a simple quick fix: make these operations last longer (storage access requires disk access) to consume more gas, and eventually the DoS problem will be weakened by about 3 times. In the meantime, the client team has done some excellent work - implementing disk storage caching, reducing the number of database queries required for storage loading, and plugging this vulnerability in the long run. The gas cost repricing combined with these client improvements makes the existing blockchain more secure and makes it safer to provide a gas limit than it is now. After EIP-2929, the main reason to avoid a large gas limit increase is actually no longer the DoS attack problem, but the increase in state size (these two aspects affect each other: storage loading consumes more gas when the storage load becomes larger). Therefore, state expiration and statelessness will become very important, and can even be said to be the top priority after the "merge". The second biggest long-term benefit of this repricing is that the witness size for stateless verification can theoretically be reduced by up to a factor of 3. For code reading, we will also need a repricing (something like: 500 gas per 31 bytes of code access), but this can be implemented in the future. Please note: this EIP only increases the gas cost for the first access of each transaction. Subsequent accesses are actually cheaper (100 gas in all cases). In addition, calls to the precompile always cost only 100 gas, including the first call. This has the following positive effects:
The first access rule is added because when an account or storage slot is accessed for the second time, it should already be cached in the content, so no expensive disk access is needed. Of course, two accesses to the same value only require one witness entry. |
Mole position and destiny chart Everyone has mole...
A person's facial features can reflect whethe...
Palmistry diagram and career line analysis. Each ...
Some people give people the impression at first g...
Everyone has a different lifestyle. Some people a...
For two consecutive days, the U.S. Securities and...
George Kikvadze, vice president of Bitcoin mining...
A person's marriage age can be completely see...
Several miners revealed to Wu Blockchain that Bit...
Among the digital asset security platforms, one n...
As a leading global communications service provid...
On December 14, 2016, Microfinance, New Economy, ...
Illustration of moles and the 10 lucky moles. Mol...
In traditional Chinese physiognomy, the thickness...
People who have a tough attitude in life are ofte...