Usage

How to start Erigon

All-in-One Client

Hint: Before running Erigon you should decide which type of node you want to run.

The all-in-one client is the preferred option for most users. The following CLI command allows you to run an Ethereum archive node node where every process is integrated and no special configuration is needed (all-in-one client):

./build/bin/erigon

Erigon 2 must be run alongside a Consensus Layer client.

Testnets

If you're interested in trying out Erigon but don't have 2TB of spare disk space, consider syncing a public testnet like Holesky. You can do this by adding the --chain=holesky option. For faster syncing and reduced disk usage, you can also add the --prune=hrtc flag, which allows you to quickly sync the node while keeping disk space requirements relatively low.

./build/bin/erigon --chain=holesky --prune=hrtc

Help

Running make help will list and describe the convenience commands available in the Makefile.

go-version:                        print and verify go version
validate_docker_build_args:        ensure docker build args are valid
docker:                            validate, update submodules and build with docker
setup_xdg_data_home:               TODO
docker-compose:                    validate build args, setup xdg data home, and run docker-compose up
dbg                                debug build allows see C stack traces, run it with GOTRACEBACK=crash. You don't need debug build for C pit for profiling. To profile C code use SETCGOTRCKEBACK=1
geth:                              run erigon (TODO: remove?)
erigon:                            build erigon
all:                               run erigon with all commands
db-tools:                          build db tools
test:                              run unit tests with a 100s timeout
test-integration:                  run integration tests with a 30m timeout
lint:                              run golangci-lint with .golangci.yml config file
lintci:                            run golangci-lint (additionally outputs message before run)
lintci-deps:                       (re)installs golangci-lint to build/bin/golangci-lint
clean:                             cleans the go cache, build dir, libmdbx db dir
devtools:                          installs dev tools (and checks for npm installation etc.)
bindings:                          generate test contracts and core contracts
prometheus:                        run prometheus and grafana with docker-compose
escape:                            run escape path={path} to check for memory leaks e.g. run escape path=cmd/erigon
git-submodules:                    update git submodules
user_linux:                        create "erigon" user (Linux)
user_macos:                        create "erigon" user (MacOS)
coverage:                          run code coverage report and output total coverage %
hive:                              run hive test suite locally using docker e.g. OUTPUT_DIR=~/results/hive SIM=ethereum/engine make hive
automated-tests                    run automated tests (BUILD_ERIGON=0 to prevent erigon build with local image tag)
help:                              print commands help

Last updated

Was this helpful?