Skip to content

Databases

Chapter 29: Database Backends (LevelDB, RocksDB, MDBX)

Section titled “Chapter 29: Database Backends (LevelDB, RocksDB, MDBX)”

Blockchain nodes use key-value databases to store blockchain data.


  • Used by: Geth (legacy)
  • Written in: C++
  • Type: LSM tree
  • Used by: Many blockchain clients
  • Written in: C++
  • Type: LSM tree
  • Facebook-developed
  • Used by: Erigon
  • Written in: C
  • Type: B+ tree
  • Fast, memory-efficient

DatabaseSpeedMemoryUse Case
LevelDBMediumMediumLegacy Geth
RocksDBFastHighMany clients
MDBXVery FastLowErigon

Terminal window
# Build Geth with rocksdb
make geth TAGS=rocksdb

  • Database choice affects performance
  • MDBX (Erigon) is fastest
  • RocksDB widely used

Last Updated: 2026-02-20