---
eip: 1803
label: EIP-1803
title: Rename opcodes for clarity
status: Stagnant
type: Standards Track
category: Interface
created: 2017-07-28
requires: 141
official: https://eips.ethereum.org/EIPS/eip-1803
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1803.md
canonical: https://eips.huatuo.xyz/eip-1803/
lang: en
tldr: Proposed renaming six EVM opcode mnemonics (such as SHA3 to KECCAK256 and GAS to GASLEFT) so their names match what they actually do; bytecode is unaffected.
tags: [evm, opcodes, naming, tooling, interface]
---

# EIP-1803: Rename opcodes for clarity

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

**TL;DR:** Proposed renaming six EVM opcode mnemonics (such as SHA3 to KECCAK256 and GAS to GASLEFT) so their names match what they actually do; bytecode is unaffected.

## What problem does it solve?

Some EVM opcode names are misleading, a leftover from early design:

- `SHA3` actually computes Keccak-256, which differs from the final NIST SHA-3 standard.
- `GAS` returns the gas *remaining*, not gas used or a gas limit.
- `GASLIMIT` is the *block* gas limit, easily confused with a transaction's gas limit.
- `INVALID` (`0xfe`) is a specific designated opcode ([EIP-141](/eip-141/)), but the name sounds like "any undefined opcode".

Confusing names lead to bugs in assemblers, disassemblers, documentation and people's mental models. This EIP only changes the human-readable names.

## How it works

The proposed renames:

| Opcode | Old name | New name | Why |
| --- | --- | --- | --- |
| `0x31` | `BALANCE` | `EXTBALANCE` | Consistent with `EXTCODESIZE`, `EXTCODECOPY`, `EXTCODEHASH` |
| `0x20` | `SHA3` | `KECCAK256` | It is Keccak-256, not standard SHA-3 |
| `0x43` | `NUMBER` | `BLOCKNUMBER` | Clear that it is the block number |
| `0x45` | `GASLIMIT` | `BLOCKGASLIMIT` | Not the transaction gas limit |
| `0x5a` | `GAS` | `GASLEFT` | It returns remaining gas |
| `0xfe` | `INVALID` | `ABORT` | The designated invalid instruction, not any unknown opcode |

Byte values and behaviour do not change, so no hard fork is needed. Only tools that print or parse mnemonics are affected.

There is precedent: [EIP-6](/eip-6/) renamed `SUICIDE` (`0xff`) to `SELFDESTRUCT`.

## Sample code

Solidity and Yul already use the clearer names at the language level, even where the opcode is still often listed under its old name:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract Names {
    function demo(bytes calldata data) external view returns (bytes32 h, uint256 left, uint256 blk) {
        h = keccak256(data);     // opcode 0x20, a.k.a. SHA3
        left = gasleft();        // opcode 0x5a, a.k.a. GAS
        blk = block.number;      // opcode 0x43, a.k.a. NUMBER
        assembly {
            let lim := gaslimit() // opcode 0x45, block gas limit
            pop(lim)
        }
    }
}
```

## Things to know

- Status is **Stagnant**. It was never formally adopted, so tools disagree: you will see both `SHA3` and `KECCAK256` in disassemblers, docs and opcode tables.
- Because nothing on-chain changes, the impact is purely on tooling and documentation.
- Solidity and Yul independently converged on `keccak256` and `gasleft()`, which covers the two renames people trip over most.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-1803
