Skip to main content

Erigon

Formerly TurboGeth, Erigon is an Ethereum client built to enable performance optimizations. Erigon is written in Go and licensed under the GNU LGPLv3.

Repository: https://github.com/erigontech/erigon

There are 2 main options for running Erigon:

Option 1: Using Docker

1. Folder Structure

Create your folder structure:

mkdir -p /home/$USER/gnosis/{jwtsecret,execution}
chown -R 1000:1000 /home/$USER/gnosis/execution
/home/$USER/gnosis/
|── execution/
└── jwtsecret/

2. Docker Compose

Create a docker-compose file with your favorite text editor in /home/$USER/gnosis/docker-compose.yml:

/home/$USER/gnosis/docker-compose.yml
version: "3"
services:
execution:
container_name: execution
image: erigontech/erigon:latest
restart: unless-stopped
volumes:
- /home/$USER/gnosis/execution:/home/erigon/.local/share/erigon
- /home/$USER/gnosis/jwtsecret/jwt.hex:/jwt:ro
networks:
- gnosis_net
ports:
- 30303:30303
- 30303:30303/udp
- 30304:30304
- 30304:30304/udp
- 42069:42069
- 42069:42069/udp
- 4000:4000/udp
- 4001:4001
expose:
- 8545
- 8551
command: |
--chain=gnosis
--http
--http.api=eth,debug,net,trace,web3,erigon
--ws
--metrics
--metrics.addr=0.0.0.0
--pprof
--pprof.addr=0.0.0.0
--pprof.port=6070
--authrpc.addr=0.0.0.0
--authrpc.jwtsecret=/jwt
--authrpc.vhosts=*
--prune=htcr
--torrent.download.rate=16mb
--torrent.upload.rate=16mb
user: 1000:1000

networks:
gnosis_net:
name: gnosis_net
Note

By default, metrics and pprof use the same port, 6060. Therefore, it is required to configure the port correctly if both options are enabled.

3. JWT Secret

The JWT secret is a token that allows the EL client to communicate with the CL client, and is required for Erigon to operate post-merge. We use rand to create a random string, and store the jwt.hex file in /home/$USER/gnosis/jwtsecret/.

Check create JWT section in Step 1: Configure Server.

4. Start Container

Start the Execution layer client listed in the compose file:

cd /home/$USER/gnosis
docker-compose up -d

5. Monitor Logs

Check your logs with:

docker logs -f --tail 500 execution

6. Updating your Node

To update, just pull the new image, then stop and restart your docker-compose file:

cd /home/$USER/gnosis
docker-compose pull
docker-compose stop
docker-compose up -d

Option 2: Using system process

Refer to Erigon Guide.

Erigon Archive Node

Archive node is the default option by Erigon. It takes about 370GB (January 2023) to run a Gnosis Chain Archive node. Please check the system requirements of your server before running an archive node.

To run an Erigon pruned node, --prune=htcr command need to be added.