Skip to content

Erigon

Chapter 9: Erigon Client - High-Performance Ethereum

Section titled “Chapter 9: Erigon Client - High-Performance Ethereum”

Erigon (formerly TurboGeth) is a high-performance Ethereum implementation written in Go. It’s designed to be faster and more resource-efficient than Geth while maintaining full compatibility.


Erigon is a next-generation Ethereum client focused on:

  • Speed: Faster synchronization and queries
  • Storage Efficiency: Smaller disk footprint
  • Performance: Better RPC throughput
  • Modularity: Separate components
┌─────────────────────────────────────────────────────────────────────────────┐
│ ERIGON VS GETH COMPARISON │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ Feature │ Erigon (TurboGeth) │ Geth (Go Ethereum) │
│ ────────────────────┼─────────────────────┼────────────────────────────── │
│ Sync Speed │ Faster (3-5 days) │ Slower (1-2 weeks) │
│ Storage │ ~900GB (pruned) │ ~1.2TB (pruned) │
│ RPC Performance │ Higher throughput │ Lower throughput │
│ Database │ MDBX (custom) │ LevelDB │
│ Snap Sync │ Optimized │ Standard │
│ Archive Mode │ ~6TB │ ~12TB │
│ Active Development │ Erigon Team │ Ethereum Foundation │
│ │
└─────────────────────────────────────────────────────────────────────────────┘

RequirementMinimumRecommended
CPU8 cores16+ cores
RAM16 GB32 GB
Storage1 TB NVMe SSD2 TB NVMe SSD
OSUbuntu 20.04+Ubuntu 22.04 LTS
Terminal window
# Download latest Erigon
cd /tmp
wget https://github.com/ledgerwatch/erigon/releases/download/v2.56.0/erigon_2.56.0_linux_amd64.tar.gz
tar -xzf erigon_2.56.0_linux_amd64.tar.gz
sudo mv erigon /usr/local/bin/
rm -rf erigon_2.56.0_linux_amd64.tar.gz
# Verify installation
erigon --version
Terminal window
# Install dependencies
sudo apt-get install build-essential git
# Clone repository
git clone https://github.com/ledgerwatch/erigon.git
cd erigon
# Build
make erigon
# Install
sudo cp build/bin/erigon /usr/local/bin/

Terminal window
# Start Erigon with defaults
erigon
# Start with custom settings
erigon \
--chain mainnet \
--syncmode snap \
--http \
--http.addr 0.0.0.0 \
--http.port 8545 \
--http.api eth,net,web3,erigon,debug,trace \
--ws \
--ws.port 8546 \
--datadir /data/erigon \
--port 30303 \
--maxpeers 100
FlagDescriptionExample
--chainBlockchain networkmainnet, sepolia
--syncmodeSync modesnap, full, light
--httpEnable HTTP
--http.apiEnabled APIseth,net,web3,erigon
--datadirData directory/data/erigon
--http.vhostsAllowed hostslocalhost,*

┌─────────────────────────────────────────────────────────────────────────────┐
│ ERIGON ARCHITECTURE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ ERIGON CORE │ │
│ │ │ │
│ │ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐ │ │
│ │ │ MDBX DB │ │ State diffs │ │ Freezer │ │ │
│ │ │ (Key-Value) │ │ (Snapshots) │ │ (Historical) │ │ │
│ │ └────────────────┘ └────────────────┘ └────────────────┘ │ │
│ │ │ │
│ │ ┌────────────────┐ ┌────────────────┐ │ │
│ │ │ RPC Daemon │ │ Downloader │ │ │
│ │ │ (Parallel) │ │ (Segments) │ │ │
│ │ └────────────────┘ └────────────────┘ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
│ │
│ Advantages: │
│ - Parallel RPC handlers │
│ - Compressed state snapshots │
│ - Efficient storage with MDBX │
│ - Historical data freezer (reduces storage) │
│ │
└─────────────────────────────────────────────────────────────────────────────┘

Erigon uses state snapshots to speed up sync:

Terminal window
# Enable snapshots (enabled by default)
--snapshots true
# Snapshot generation
erigon --snapshots=true --internalcl

Erigon moves old data to “freezer”:

Terminal window
# Freezer directory (separate from main DB)
--externalcl
# Automatically freezes historical blocks after some epochs

APIDescription
ethStandard Ethereum JSON-RPC
netNetwork information
web3Web3 utilities
erigonErigon-specific APIs
debugDebugging & tracing
traceTransaction tracing
// erigon_getBlockByTimestamp
{
"jsonrpc": "2.0",
"method": "erigon_getBlockByTimestamp",
"params": [1699999999, false],
"id": 1
}
// erigon_getLogsByHash
{
"jsonrpc": "2.0",
"method": "erigon_getLogsByHash",
"params": ["0xabc123..."],
"id": 1
}
// erigon_forks
{
"jsonrpc": "2.0",
"method": "erigon_forks",
"params": [],
"id": 1
}

Terminal window
erigon \
--chain mainnet \
--syncmode snap \
--http \
--http.addr 0.0.0.0 \
--http.port 8545 \
--http.api eth,net,web3,erigon,debug,trace \
--http.vhosts "*" \
--http.corsdomain "*" \
--ws \
--ws.addr 0.0.0.0 \
--ws.port 8546 \
--ws.api eth,net,web3,erigon,debug,trace \
--ws.origins "*" \
--datadir /data/erigon \
--port 30303 \
--maxpeers 100 \
--metrics \
--metrics.addr 0.0.0.0 \
--metrics.port 6060 \
--pprof \
--pprof.addr 0.0.0.0 \
--pprof.port 6061 \
--torrent.port 42000 \
--prune htc \
--prune.rct 1000 \
--prune.ctb 90000
Terminal window
# Prune everything (h=history, t=receipts, c=call traces)
--prune htc
# Keep last 90,000 blocks of history
--prune htc --prune.h.older 90000

[Unit]
Description=Erigon Ethereum Node
After=network.target
[Service]
Type=simple
User=ethereum
Group=ethereum
Restart=always
RestartSec=10
ExecStart=/usr/local/bin/erigon \
--chain mainnet \
--syncmode snap \
--http \
--http.addr 127.0.0.1 \
--http.port 8545 \
--http.api eth,net,web3,erigon,debug,trace \
--ws \
--ws.addr 127.0.0.1 \
--ws.port 8546 \
--ws.api eth,net,web3,erigon,debug,trace \
--datadir /data/erigon \
--port 30303 \
--maxpeers 100 \
--metrics \
--metrics.port 6060 \
--pprof
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/data/erigon
[Install]
WantedBy=multi-user.target

Terminal window
# Attach to Erigon RPC
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
# Check block number
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# Erigon-specific status
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"erigon_nodeInfo","params":[],"id":1}'

Terminal window
# Install Nethermind
dotnet tool install -g nethermind
nethermind --config mainnet
# Or download binary
wget https://github.com/NethermindEth/nethermind/releases/download/1.25.0/nethermind-linux-x64-1.25.0.tar.gz
Terminal window
# Install Besu
wget https://github.com/hyperledger/besu/releases/download/23.10.1/besu-23.10.1.tar.gz
tar -xzf besu-23.10.1.tar.gz
# Run
./besu --network=mainnet --rpc-http-enabled --rpc-http-port=8545
Terminal window
# Install Reth
cargo install --git https://github.com/paradigmxyz/reth.git reth --locked
# Run
reth node --chain mainnet --http --http.port 8545

QuestionAnswer
What is Erigon?High-performance Ethereum client (formerly TurboGeth)
How is Erigon faster?Optimized DB (MDBX), snapshots, parallel RPC
Storage difference?Erigon uses less storage (~900GB vs 1.2TB)
Can Erigon replace Geth?Yes, it’s API compatible

  • Erigon is a fast, efficient Ethereum client
  • Uses MDBX database and snapshots
  • API-compatible with Geth
  • Excellent for high-throughput RPC services

In Chapter 10: Besu - Enterprise Ethereum Client, we’ll explore Besu for enterprise use cases.


Last Updated: 2026-02-20