git clone --recurse-submodules -j8 <https://github.com/maticnetwork/erigon.git>
cd erigon
git checkout v0.0.6
make erigon
This should create the binary at
./build/bin/erigon
Use tag v0.0.6
on our forked repo to have a stable version.
To start Erigon, run
erigon --chain=mumbai
chain=mumbai
for Mumbai testnetchain=bor-mainnet
for MainnetIf you want to store Erigon files in a non-default location use -datadir
erigon --chain=mumbai --datadir=<your_data_dir>
If you are not using local heimdall use -bor.heimdall=<your heimdall url>
(else by default it will try to connect to localhost:1317
)
erigon --chain=mumbai --bor.heimdall=<your heimdall url> --datadir=<your_data_dir>
For example if you want to connect to Mumbai use
For Mainnet
Make sure to add snapshot flag with the false value, default value is true currently and it leads to lost state sync transactions of retired blocks
erigon --chain=mumbai --bor.heimdall=<your heimdall url> --datadir=<your_data_dir> --snapshots=false
Note : Replace 512 with whatever bandwidth your machine can manage
--torrent.upload.rate="512mb" --torrent.download.rate="512mb"