The Ethereum network faced a serious transaction spam attack on September 22, 2016, as an unknown attacker exploited the EXTCODESIZE opcode to create computationally expensive blocks that took up to 20 to 60 seconds to validate. The attack specifically targeted the disk read operations required by Ethereum nodes, forcing approximately 50,000 disk fetches per transaction and resulting in a 2 to 3x reduction in the rate of block creation across the network.
TL;DR
- Ethereum suffered a transaction spam attack exploiting the EXTCODESIZE opcode on September 22, 2016
- Blocks took 20-60 seconds to validate due to roughly 50,000 disk fetches per transaction
- Block creation rate dropped 2-3x during the attack, but no consensus failure occurred
- Ethereum developers recommended geth users add specific flags to increase cache and reduce gas limit
- Medium-term fixes included automatic gas limit adjustments and protocol-level gas cost changes for Metropolis
How the Attack Worked
The attacker crafted transactions that repeatedly called the EXTCODESIZE opcode, an operation that requires nodes to read state information from disk. While EXTCODESIZE had a relatively low gas cost, the computational burden it imposed was disproportionately high. Each transaction triggered approximately 50,000 disk fetches because the contracts being read were roughly 18 KB long, making EXTCODESIZE reads several times slower than other I/O-heavy operations.
This was not the first time the Ethereum network had come under sustained attack in September 2016. Earlier in the month, the network had weathered previous denial of service attempts, and this second wave represented a more refined approach targeting specific weaknesses in the gas pricing model for certain opcodes.
Immediate Response and Mitigation
The Ethereum Foundation published an urgent advisory recommending that miners, exchanges, and individual users run geth with specific configuration flags to mitigate the attack. The recommended parameters included increasing the cache size to 1024 and voting the gas limit down to approximately 1,500,000 by setting a gas price of 20 Gwei. Parity users received similar recommendations with equivalent parameters.
These adjustments served two critical purposes. First, the increased cache size reduced the number of disk reads that nodes needed to make, improving overall performance. Second, the reduced gas limit decreased the maximum processing time per block by approximately three times, making the network more resilient to similar spam attacks.
Medium and Long-Term Solutions
The Ethereum development team outlined several medium-term fixes expected within days to a week. These included a change to miner software that would automatically cut the gas limit target by 2x whenever a miner encountered a block taking longer than 5 seconds to process. This was designed as a miner strategy change rather than a soft fork or hard fork, meaning it could be deployed without network-wide consensus requirements.
Additional improvements in the pipeline included numerical tweaks to cache settings, additional caching mechanisms, and a specialized cache specifically for EXTCODESIZE operations. The team also explored replacing the LevelDB database with a more performant solution optimized for Ethereum’s specific use case.
Looking further ahead, developers proposed protocol-level changes for the upcoming Metropolis upgrade that would increase the gas costs of opcodes requiring account state reads, including SLOAD, EXTCODESIZE, and CALL. Increasing the gas cost of these operations to at least 500 would impose a much lower upper bound on the maximum number of bytes a transaction could read, improving security against all similar attacks while also reducing Merkle proof sizes and enhancing security for light clients and sharding.
Network Status and Market Context
Despite the severity of the attack, the Ethereum Foundation confirmed that there was no consensus failure or network fork at any point. The network did not fully halt, and by the time the advisory was published, the attack had mostly subsided with the network recovering its normal operating capacity.
At the time of the attack, Ethereum was trading at approximately $13.25 with a market capitalization of roughly $1.12 billion, making it the second-largest cryptocurrency behind Bitcoin at $596.30. The attack highlighted the ongoing challenges facing the young blockchain network, which was still in its early stages of development and had already weathered the DAO hack earlier in the summer.
Why This Matters
The September 22 spam attack was a pivotal stress test for the Ethereum network during a critical period in its development. Coming just months after the DAO hack and the subsequent hard fork that split Ethereum into ETH and ETC, the attack underscored the importance of robust gas pricing models and the ongoing cat-and-mouse game between network developers and malicious actors. The rapid response from the Ethereum Foundation and the protocol-level improvements that followed laid important groundwork for Ethereum’s continued evolution and eventual transition to proof of stake. For altcoin investors and blockchain developers, this incident serves as a lasting reminder that network security is not just about consensus mechanisms but also about the economic incentives embedded in every opcode.
Disclaimer: This article is for informational purposes only and does not constitute financial advice. Cryptocurrency investments carry significant risk. Always conduct your own research before making investment decisions.
gas limit adjustments during the spam attack showed how resilient the network could be
gas limit adjustments during the attack proved ethereum could self-heal under pressure. critical precedent
attackers exploited a specific opcode to bloat transactions – classic eth growing pains
50000 disk fetches per transaction because gas pricing was wrong. the simplest exploits are always the most effective
the gas pricing mismatch on EXTCODESIZE was a known issue that got deprioritized. 50K disk fetches per tx and nobody thought to adjust the opcode cost. simplest exploits are always the most embarrassing
extcodesize spam attack was one of the earliest denial of service attacks on ethereum