Skip to main content
Security

Gas Reprice: Emergency Response to DoS Attacks

At block 2,500,000 on October 24, 2016, the Gas Reprice upgrade (EIP-150) was activated as an emergency response to the Shanghai DoS attacks that had been crippling the network.

ETC Community
Ethereum Classic Community
3 min read

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:

OpcodeBeforeAfter
EXTCODESIZE20 gas700 gas
EXTCODECOPY20 gas700 gas
BALANCE20 gas400 gas
SLOAD50 gas200 gas
CALL / DELEGATECALL40 gas700 gas
SELFDESTRUCT (new account)0 gas5,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).

Share This Article

Help spread the word about Ethereum Classic and support the ecosystem