EIP-609 · Final · Meta · 2017-04-23
EIP-609: Hardfork Meta: Byzantium
The Meta EIP for Byzantium, the 2017 hard fork that added REVERT, STATICCALL, return-data opcodes, zk-friendly precompiles and receipt status codes, and cut the block reward from 5 to 3 ETH.
What problem does it solve?
A hard fork bundles many independent changes, and every client must activate all of them at the same block. A "Hardfork Meta" EIP is the single reference that says exactly what a fork contains and when it starts.
EIP-609 does this for Byzantium, the first part of the "Metropolis" roadmap stage (it is also called "Metropolis part 1").
How it works
Activation is by block number:
- Mainnet: block 4,370,000 (October 2017)
- Ropsten testnet: block 1,700,000
Included changes:
| EIP | What it does |
|---|---|
| EIP-100 | Difficulty adjustment that counts uncles, targeting a steady mean block time |
| EIP-140 | REVERT opcode: abort, refund unused gas and return an error message |
| EIP-196 | alt_bn128 elliptic-curve add and scalar-multiply precompiles |
| EIP-197 | alt_bn128 pairing-check precompile (makes zkSNARK verification practical) |
| EIP-198 | Big-integer modular exponentiation precompile (RSA and more) |
| EIP-211 | RETURNDATASIZE and RETURNDATACOPY for variable-length return data |
| EIP-214 | STATICCALL: a call that cannot change state |
| EIP-649 | Delays the difficulty bomb and lowers the block reward from 5 to 3 ETH |
| EIP-658 | Receipts include a success or failure status field |
Together these shaped how contracts are written today. Solidity's require with a reason string relies on REVERT, view calls to other contracts rely on STATICCALL, and wallets show "failed" transactions using the receipt status.
Sample code
Since Byzantium, a receipt carries status (1 = success, 0 = failure) instead of the old intermediate state root. With ethers v6:
import { JsonRpcProvider } from "ethers";
const BYZANTIUM_BLOCK = 4_370_000;
const provider = new JsonRpcProvider(process.env.RPC_URL);
const receipt = await provider.getTransactionReceipt(txHash);
if (receipt && receipt.blockNumber >= BYZANTIUM_BLOCK) {
console.log(receipt.status === 1 ? "succeeded" : "reverted");
} else if (receipt) {
console.log("pre-Byzantium receipt: has a state root, no status field");
}
Things to know
- This proposal is Final. Byzantium is active on mainnet.
- The fork comes after Spurious Dragon (EIP-607) and before Constantinople.
- EIP-609 is a list. The exact rules (gas costs, encodings) are in each linked EIP, and some have been changed by later forks. For example, the MODEXP gas formula from EIP-198 was later repriced.