On-page actions for Erigon client
Erigon client can be used for staking on various supported chains. Client installation is always only one, used by services with an individual configuration (different service name, data path and ports in use).
One-page interactive complete guide to configurate and operate Erigon client.
This guide is for informational purposes only. The author nor website owner does not guarantee accuracy of the information in this guide and is not responsible for any damages or losses incurred by following the guide.
Erigon client can be used for staking on various supported chains. Client installation is always only one, used by services with an individual configuration (different service name, data path and ports in use).
Erigon documentation: https://erigon.gitbook.io/erigon
2.61.0
cd ~/downloads && curl -LO https://github.com/erigontech/erigon/releases/download/v2.61.0/erigon_v2.61.0_linux_amd64v2.tar.gz
sha256sum erigon_v2.61.0_linux_amd64v2.tar.gz
And check it compare to the provided hash for the file from https://github.com/erigontech/erigon/releases/download/v2.61.0/erigon_v2.61.0_checksums.txt (Note: The link links at 2.61.0 version )
tar xvf erigon_v2.61.0_linux_amd64v2.tar.gz
sudo cp -a erigon_v2.61.0_linux_amd64v2 /usr/local/bin/erigonlib
cd ~/downloads && rm -r erigon_v2.61.0_linux_amd64v2.tar.gz && rm -r erigon_v2.61.0_linux_amd64v2
sudo useradd --system --no-create-home --shell /bin/false erigon
sudo mkdir -p /var/lib/erigon
sudo chown -R erigon:erigon /var/lib/erigon
Change the default ports below if you are going to stake on more chains simultaneously (e.g. Ethereum and Gnosis at once) on the same machine. If you are going to stake only, you can keep the default ports. If you are changing the default ports, be sure that the newly selected port is not already in used. A port in used may be checked with following code:
ss -tuln | grep ':PORT'
(Default
port: 30303
)
(Default
port: 8545
)
(Default
port: 8551
)
To allow execution client synchronization, there's need to enable port 30303
reserved for P2P traffic to TCP (allows the node to connect to peers) and UDP (allows node discovery). It may be done with following UFW setup:
$ sudo ufw allow 30303
Use this option only if you need operate execution client and beacon client on different machines.
30303
for P2P traffic
To allow execution client synchronization, there's need to enable port 30303
reserved for P2P traffic to TCP (allows the node to connect to peers) and UDP (allows node discovery). It may be done with following UFW setup:
$ sudo ufw allow 30303
8551
for IP of your second machine
sudo ufw allow from 192.168.88.0/27 to any port 8551
Note: Be sure you use proper IP of your second machine / proper local network configuration.
sudo nano /etc/systemd/system/erigon.service
[Unit]
Description=Erigon Execution Client (Ethereum Mainnet)
After=network.target
Wants=network.target
[Service]
User=eth-erigon
Group=eth-erigon
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/erigonlib/erigon \
--chain=mainnet \
--datadir=/var/lib/erigon \
--authrpc.jwtsecret=/var/lib/jwtsecret/ethereum.hex \
# --externalcl \
--prune=htcr
# --private.api.addr= \
# --prune.r.before=11052984
[Install]
WantedBy=default.target
[Unit]
Description=Erigon Execution Client (Gnosis Chain)
After=network.target
Wants=network.target
[Service]
User=gno-erigon
Group=gno-erigon
Type=simple
Restart=always
RestartSec=5
ExecStart=/usr/local/bin/erigonlib/erigon \
--chain=gnosis \
--datadir=/var/lib/erigon \
--authrpc.jwtsecret=/var/lib/jwtsecret/gnosis.hex \
# --externalcl \
--prune=htcr
# --private.api.addr= \
# --prune.r.before=11052984
[Install]
WantedBy=default.target
*Note: Update JsonRpc.JwtSecretFile
, if you use different CTRL
+ X
then Y
then ENTER
to save and exit the config file.sudo systemctl daemon-reload
sudo systemctl start erigon
systemctl status erigon
journalctl -fu erigon
sudo systemctl enable erigon
sudo nano /usr/local/bin/delayed-start.sh
Configurate service start inside it
systemctl start erigon.service
delayed-start.service
service controlling delayed-start.sh
is enabled for auto start with system startup
sudo systemctl enable delayed-start.service
sudo nano /usr/local/etc/staking/config/clients.conf
If the file is empty, generate it with command sudo /usr/local/bin/staking.sh init
executionClients="erigon"
executionServices="erigon.service"
sudo nano /usr/local/bin/delayed-start.sh
/usr/local/bin/staking.sh start execution
sudo systemctl enable delayed-start.service
Erigon documentation: https://erigon.gitbook.io/erigon
$ /usr/local/bin/erigonlib/erigon -v
2.61.0
cd ~/downloads && curl -LO https://github.com/erigontech/erigon/releases/download/v2.61.0/erigon_v2.61.0_linux_amd64v2.tar.gz
sha256sum erigon_v2.61.0_linux_amd64v2.tar.gz
And check it compare to the provided hash for the file from https://github.com/erigontech/erigon/releases/download/v2.61.0/erigon_v2.61.0_checksums.txt (Note: The link links at 2.61.0 version )
tar xvf erigon_v2.61.0_linux_amd64v2.tar.gz
Note: It's a good practice to check the log before stopping the client. journalctl -fu erigon
sudo systemctl stop erigon && systemctl status erigon
sudo rm -r /usr/local/bin/erigonlib
sudo cp -a erigon_v2.61.0_linux_amd64v2 /usr/local/bin/erigonlib
sudo systemctl start erigon && systemctl status erigon
journalctl -fu erigon
cd ~/downloads && rm -r erigon_v2.61.0_linux_amd64v2.tar.gz && rm -r erigon_v2.61.0_linux_amd64v2