EIP-3855

공식 웹사이트:
소셜 프로필:
블록체인:

IQ AI를 발표했습니다.

확인해보세요

EIP-3855

EIP-3855 is an that proposes to add a new instruction called PUSH0 (0x5f) in the Virtual Machine (EVM), as part of the Shanghai  of the Shapella Upgrade. This instruction aims to help reduce gas costs and storage costs for contracts that need to push constant 0 onto the stack. [1]

Overview

On February 19th, 2021, EIP-3855 was created to introduce PUSH0, aiming to reduce contract code size, lower the risk of contract misuse of other instructions, and reduce the need to use DUP instructions for duplicating zeroes. Currently, developers can use other instructions like PC, MSIZE, CALLDATASIZE, RETURNDATASIZE, CODESIZE, CALLVALUE, and SELFBALANCE to achieve this effect, but these instructions have different costs and can vary depending on the context. Also the waste produced by the current PUSH1 00 instruction across existing accounts is: 340,557,331 bytes which translates to 68,111,466,200 gas spent to deploy them. This proposal intends to reduce this redundancy along with the other main goals. [1][2]

Details

The PUSH0 instruction has no immediate data, does not pop items from the stack, and places a single item with the value 0 onto the stack. Its gas cost is 2, which is the same as other instructions that place constant values onto the stack, like ADDRESS and ORIGIN. The opcode for PUSH0 is 0x5f, which means it is in a "contiguous" space with other PUSH implementations and could potentially share the implementation. [2][3]

An analysis on Mainnet shows that around 11.5% of all PUSH* instructions executed push a value of zero, and the wasted gas and storage costs for pushing constant 0 with PUSH1 are significant. [2]

One potential issue with the introduction of PUSH0 is that already deployed contracts using this opcode could change their behavior after this EIP. However, the authors are not aware of any impact on security, and jumpdest-analysis is unaffected as PUSH0 has no immediate data bytes. [1]

Authors

  • Alex Beregszaszi
  • Hugo De la cruz
  • Paweł Bylica

[3]

See something wrong?

가격

$3,338.91

5.44%

시가 총액

$402,282,500,849.00

5.34%

희석된 시가 총액

$402,003,716,568.62

5.34%

거래량

$30,063,590,732.46

3.57%

Ethereum

ETH

USD

USD

평균 평점

아직 평가가 없습니다

경험은 어땠나요?

빠른 평가를 해서 우리에게 알려주세요!

편집자

Profile picture of Anonymous uservzbrv

편집 날짜

March 31, 2023

참고 문헌.

[1]

Medium on Shanghai Upgrade

Mar 14, 2023

[2]

Ethereum magicians on EIP-3855

Mar 14, 2023

[3]

EIPS EIP-3855

Mar 18, 2023