Erigon
Installing Erigon for Archive Nodes or disk-efficient storage.
Erigon
Erigon is an implementation of Ethereum focused on storage efficiency and speed. It uses a different database architecture (MDBX) that allows it to store a full Archive Node (all historical states) in a fraction of the space required by Geth.
🛡️ Role: Erigon is the specialist's choice. It is primarily used by indexers, block explorers, and analytics providers who need deep historical data.
Note: Erigon syncs differently. It downloads all block headers first, then block bodies, and finally executes them. It may appear "stuck" at 100% header sync for a long time—this is normal.
1. Install Dependencies
Erigon is distributed as a single binary. We only need basic tools to download and extract it.
Bash
# Update repositories
sudo apt update
# Install utilities
sudo apt install -y curl tar2. Download & Install
We will download the latest pre-built binary from the official repository.
A. Create the Application Directory
Bash
B. Set Permissions Ensure the ethereum user owns the directory and the binary is executable.
Bash
3. Configure Systemd Service
We will configure Erigon to run as a background service.
💾 Storage Mode:
Archive Node (Recommended for Erigon): Retains all historical data. Add
--prune.mode=archive.Full Node: Prunes old data to save space. Add
--prune.mode=full.
Create the service file:
Bash
Paste the following configuration:
Ini, TOML
🔍 Flag Explanation:
--prune.mode=archive: Tells Erigon to keep all historical state. (Change tofullif you have <2TB storage).--http.api: Notice we addederigonandtracenamespaces. These are powerful tools unique to Erigon for debugging transactions.--authrpc.jwtsecret: The standard Engine API authentication.
4. Start the Service
Reload the systemd daemon and start the node.
Bash
5. Verify Status
Check the logs to track the unique Erigon sync stages.
Bash
Expected Output (The Stages): Erigon does not sync like Geth. You will see it move through strict "Stages":
Stage 1:
Downloading headers(Fast)Stage 2:
Downloading bodies(Fast)Stage 3:
Executing blocks(Slow - This is where it rebuilds the state)Waiting: Finally, it will wait for the Consensus Client to follow the chain head.
Last updated