Skip to main content

Try it Live

Run Hardfork examples in the interactive playground
Conceptual Guide - For API reference and method documentation, see Hardfork API.
Ethereum hardforks are backwards-incompatible protocol upgrades that introduce new features, fix bugs, and improve performance across the network. This guide teaches hardfork fundamentals using Tevm.

What Are Hardforks?

Hardforks are coordinated protocol changes that require all nodes to upgrade. Unlike soft forks (backward-compatible), hardforks break compatibility with older node software - nodes that don’t upgrade cannot validate new blocks. Key characteristics:
  • Backwards-incompatible - Old nodes reject new blocks
  • Network-wide activation - All validators must upgrade
  • Block number or timestamp - Activation at specific height or time
  • EIP bundling - Multiple Ethereum Improvement Proposals (EIPs) per fork

Why Hardforks Are Needed

Hardforks enable protocol evolution without fragmenting the network:
  1. Bug fixes - Fix security vulnerabilities (DAO fork, Spurious Dragon)
  2. Performance improvements - Optimize gas costs, add new opcodes
  3. Feature additions - New transaction types (EIP-1559, EIP-4844), consensus changes (The Merge)
  4. Security hardening - Remove exploitable edge cases, strengthen validation

Timeline of Major Hardforks

Feature Activation

Hardforks activate at predetermined block numbers (pre-Merge) or timestamps (post-Merge):

Checking Hardfork Support

Use version comparison to gate features based on hardfork:

Comparing Hardfork Features

Compare feature availability across hardforks:

Hardfork-Dependent Features

Common features tied to specific hardforks:

EIP-1559 Base Fee (London)

EIP-3855 PUSH0 Opcode (Shanghai)

EIP-4844 Blob Transactions (Cancun)

EIP-1153 Transient Storage (Cancun)

Resources

Next Steps