HomeEIPs
EIPsEIP-1803
EIP-1803

Rename opcodes for clarity

StagnantStandards Track: Interface
Created: 2017-07-28
Requires: EIP-141
Alex Beregszaszi (@axic)
DiscussionsOriginal linkEdit
1 min read

EIP-1803 is a proposal to rename certain opcodes in Ethereum for clarity. The proposal suggests renaming BALANCE to EXTBALANCE, SHA3 to KECCAK256, NUMBER to BLOCKNUMBER, GASLIMIT to BLOCKGASLIMIT, GAS to GASLEFT, and INVALID to ABORT. The purpose of these renamings is to make the opcodes more descriptive and easier to understand for developers. The proposal notes that this will not affect any existing code, but may influence the mnemonics used by assemblers. The proposal references previous renamings of opcodes in EIP-6 and EIP-59. Overall, the proposal aims to improve the clarity and usability of Ethereum's opcode system.

Video
Anyone may contribute to propose contents.
Go propose
Original

Abstract

Rename the BALANCE, SHA3, NUMBER, GASLIMIT, GAS and INVALID opcodes to reflect their true meaning.

Specification

Rename the opcodes as follows:

  • BALANCE (0x31) to EXTBALANCE to be in line with EXTCODESIZE, EXTCODECOPY and EXTCODEHASH
  • SHA3 (0x20) to KECCAK256
  • NUMBER (0x43) to BLOCKNUMBER
  • GASLIMIT (0x45) to BLOCKGASLIMIT to avoid confusion with the gas limit of the transaction
  • GAS (0x5a) to GASLEFT to be clear what it refers to
  • INVALID (0xfe) to ABORT to clearly articulate when someone refers this opcode as opposed to "any invalid opcode"

Backwards Compatibility

This has no effect on any code. It can influence what mnemonics assemblers will use.

Implementation

Not applicable.

References

EIP-6 previously renamed SUICIDE (0xff) to SELFDESTRUCT. Renaming SHA3 was previously proposed by EIP-59.

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