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 --internalcl

Testnets

If you would like to give Erigon a try, but do not have spare 2TB on your drive, a good option is to start syncing one of the public testnets, Goerli, adding the option --chain=goerli. It syncs much quicker, and does not take so much disk space:

git clone --recurse-submodules -j8 https://github.com/ledgerwatch/erigon.git
cd erigon
make erigon
./build/bin/erigon --datadir=<your_datadir> --chain=goerli --internalcl

Please note the --datadir option that allows you to store Erigon files in a non-default location, in this example, in Goerli subdirectory of the current directory. Name of the directory --datadir does not have to match the name of the chain in --chain.

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