EIP-2488: Deprecate the CALLCODE opcode
作者 | Alex Beregszaszi |
---|---|
讨论-To | https://ethereum-magicians.org/t/eip-2488-deprecate-the-callcode-opcode/3957 |
状态 | Stagnant |
类型 | Standards Track |
分类 | Core |
创建日期 | 2019-12-20 |
依赖 | 7 |
英文版 | https://eips.ethereum.org/EIPS/eip-2488 |
目录
Abstract
Deprecate CALLCODE
in a somewhat backwards compatible way, by making it always return failure.
Motivation
CALLCODE
was part of the Frontier release of Ethereum. In the first few weeks/months it became clear that it cannot accomplish its intended design goal. This was rectified with introducing DELEGATECALL
(EIP-7) in the Homestead update (early 2016).
CALLCODE
became never utilized, but it still puts a burden on EVM implementations.
Disabling it will not improve the situation for any client whose goal is to sync from genesis, but would help light clients or clients planning to sync from a later point in time.
Specification
If block.number >= FORK_BLOCK
, the CALLCODE
(0xf2
) instruction always returns 0
, which signals failure.
Rationale
It would be possible just to remove the opcode and exceptionally abort if it is encountered. However, by returning failure, the contract has a chance to act on it and potentially recover.
向后兼容性
This is a breaking change and has a potential to break contracts. The author expects no contracts of any value should be affected.
TODO: validate this claim.
Security Considerations
TBA
测试用例
TBA
Implementation
TBA
Copyright
Copyright and related rights waived via CC0.
参考文献
Please cite this document as:
Alex Beregszaszi, "EIP-2488: Deprecate the CALLCODE opcode [DRAFT]," Ethereum Improvement Proposals, no. 2488, December 2019. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-2488.