Gas Reprice: Emergency Response to DoS Attacks

At block 2,500,000 on October 24, 2016, the Gas Reprice network upgrade activated EIP-150 in response to the Shanghai denial-of-service attacks that had been disrupting the network since September 2016. This upgrade was specified in ECIP-1015.

## The Shanghai DoS Attacks

In September and October 2016, attackers exploited underpriced I/O opcodes to create transactions that took minutes to process. Operations like EXTCODESIZE, BALANCE, and CALL were priced at 20–40 gas but required expensive disk reads, allowing attackers to generate blocks that stalled nodes for extended periods.

## EIP-150: State Access Repricing

The upgrade repriced I/O-heavy opcodes to reflect their actual computational cost:

| Opcode | Before | After |
|--------|--------|-------|
| EXTCODESIZE | 20 gas | 700 gas |
| EXTCODECOPY | 20 gas | 700 gas |
| BALANCE | 20 gas | 400 gas |
| SLOAD | 50 gas | 200 gas |
| CALL / DELEGATECALL | 40 gas | 700 gas |
| SELFDESTRUCT (new account) | 0 gas | 5,000 gas |

## The 63/64 Gas Rule

EIP-150 also introduced the 63/64 gas forwarding rule: child calls receive at most 63/64 of the parent's available gas. This limits practical call depth and prevents stack-depth DoS attacks, where an attacker could force arbitrarily deep call chains.

## Significance

The Gas Reprice was one of the few post-DAO-Fork security measures coordinated between Ethereum and Ethereum Classic, as both networks were vulnerable to the same attack vectors. The repricing established the principle that gas costs should reflect actual I/O and computation costs — a principle refined in later upgrades (EIP-1884 in Phoenix, EIP-2929 in Magneto).