Storage
Chapter 27: Node Data Storage
Section titled “Chapter 27: Node Data Storage”Overview
Section titled “Overview”Understanding how blockchain nodes store data is crucial for managing storage requirements and optimizing performance.
27.1 Storage Overview
Section titled “27.1 Storage Overview”Ethereum Data Structure
Section titled “Ethereum Data Structure”┌─────────────────────────────────────────────────────────────────┐│ ETHEREUM STORAGE │├─────────────────────────────────────────────────────────────────┤│ ││ ┌─────────────────────────────────────────────────────────┐ ││ │ LEVELDB / MDBX │ ││ │ │ ││ │ Key-Value Store │ ││ │ │ ││ │ ┌────────────┬──────────────────┐ │ ││ │ │ Key │ Value │ │ ││ │ ├────────────┼──────────────────┤ │ ││ │ │ h:0x0000 │ Block #0 │ │ ││ │ │ h:0x0001 │ Block #1 │ │ ││ │ │ h:0x0002 │ Block #2 │ │ ││ │ │ h:0x... │ ... │ │ ││ │ │ s:0x... │ State (accounts)│ │ ││ │ │ t:0x... │ Transactions │ │ ││ │ └────────────┴──────────────────┘ │ ││ │ │ ││ └─────────────────────────────────────────────────────────┘ ││ │└─────────────────────────────────────────────────────────────────┘27.2 Storage Requirements
Section titled “27.2 Storage Requirements”Ethereum Mainnet
Section titled “Ethereum Mainnet”| Node Type | Storage Required |
|---|---|
| Full Node | ~1.2 TB |
| Pruned Node | ~1.2 TB |
| Archive Node | ~12 TB |
By Component
Section titled “By Component”| Data | Approximate Size |
|---|---|
| Block data | ~600 GB |
| State data | ~500 GB |
| Historical data | ~100 GB |
27.3 Data Directories
Section titled “27.3 Data Directories”Geth Data Directory
Section titled “Geth Data Directory”/data/ethereum/├── geth/│ ├── chaindata/ # Blockchain data│ │ └── 000001.log # LevelDB files│ ├── triecache/ # Trie cache│ ├── snapshots/ # State snapshots│ └── nodes/ # Peer information├── keystore/ # Account keys└── history/ # Historical state27.4 Storage Optimization
Section titled “27.4 Storage Optimization”Pruning
Section titled “Pruning”# Enable automatic pruninggeth --pruneancientstore
# Manual pruninggeth removedbSnapshots
Section titled “Snapshots”# Enable snapshotsgeth --snapshot=trueSummary
Section titled “Summary”- Blockchain nodes store data in key-value databases
- Storage requirements vary by node type
- Pruning reduces storage needs
- Use SSDs for performance
Next Chapter
Section titled “Next Chapter”In Chapter 28: State & Merkle Trie Structures, we’ll explore data structures.
Last Updated: 2026-02-20