HomeEIPs
EIPsEIP-2488
EIP-2488

Deprecate the CALLCODE opcode

StagnantStandards Track: Core
Created: 2019-12-20
Requires: EIP-7
Alex Beregszaszi (@axic)
DiscussionsOriginal linkEdit
1 min read

EIP-2488 proposes to deprecate the CALLCODE opcode in Ethereum by making it always return failure in a backwards compatible way. The rationale is that CALLCODE was never utilized and puts a burden on EVM implementations, and disabling it would help light clients or clients planning to sync from a later point in time. This is a breaking change with the potential to break contracts, but the author expects no contracts of any value should be affected.

Video
Anyone may contribute to propose contents.
Go propose
Original

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.

Backwards Compatibility

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

Test Cases

TBA

Implementation

TBA

Copyright and related rights waived via CC0.

Further reading
Anyone may contribute to propose contents.
Go propose
Adopted by projects
Anyone may contribute to propose contents.
Go propose

Not miss a beat of EIPs' update?

Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.

View all
Serve Ethereum Builders, Scale the Community.
Resources
GitHub
Supported by