-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EIP-1803: Rename opcodes for clarity (#1803)
- Loading branch information
1 parent
f4cdc23
commit c36b301
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
eip: 1803 | ||
title: Rename opcodes for clarity | ||
author: Alex Beregszaszi (@axic) | ||
type: Standards Track | ||
category: Interface | ||
status: Draft | ||
created: 2017-07-28 | ||
requires: 141 | ||
--- | ||
|
||
## 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 | ||
|
||
Renaming `SHA3` was previously proposed by [EIP-59](https://github.com/ethereum/EIPs/issues/59). | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |