How to run a Gnosis Chain node
System Requirements
Follow the Prerequisites:
For an archive node of Gnosis Chain mainnet: 1.7TB
For a full node: 530GB
Install Erigon​
For MacOS and Linux, run the following commands to build the latest Erigon version from source:
git clone --branch v2.61.3 --single-branch https://github.com/erigontech/erigon.git
cd erigon
make erigon
This should create the binary at ./build/bin/erigon
.
Start Erigon​
Alongside Erigon you must use a Consensus Layer like Lighthouse. This will also allow you to access the Ethereum blockchain directly and give you the possibility to stake your GNO and do block production.
Start Erigon
./build/bin/erigon --chain=gnosis
Install Lighthouse, another popular client that can be used with Erigon for block building. Follow the instructions until the chapter Build Lighthouse, skipping the make
instruction.
Now compile Lighthouse in order to run Gnosis Chain using the feature flags :
cd lighthouse
env FEATURES=gnosis make
Because Erigon needs a target head in order to sync, Lighthouse must be synced before Erigon may synchronize. The fastest way to synchronize Lighthouse is to use one of the many public checkpoint synchronization endpoints:
https://checkpoint.gnosischain.com for Gnosis Chain
https://checkpoint.chiadochain.net for Chiado Testnet
In order to communicate with Erigon the execution endpoint <erigon address>:8551
must be specified, where <erigon address>
is either //localhost
or the IP address of the device running Erigon.
Lighthouse must point to the JWT secret automatically created by Erigon in the datadir directory (in the below example the default data directory is used).
Below is an example of Lighthouse running Gnosis Chain:
lighthouse \
--network gnosis beacon_node \
--datadir=data \
--http \
--execution-endpoint http://localhost:8551 \
--execution-jwt /home/admin/.local/share/erigon/jwt.hex \
--checkpoint-sync-url "https://checkpoint.gnosischain.com"
Below is an example of Lighthouse running Chiado testnet:
lighthouse \
--network chiado \
--datadir=data \
--http \
--execution-endpoint http://localhost:8551 \
--execution-jwt /home/admin/.local/share/erigon/jwt.hex \
--checkpoint-sync-url "https://checkpoint.chiadochain.net"
Basic Configuration​
If you want to store Erigon files in a non-default location, add flag
--datadir=<your_data_dir>
Default data directory is /home/admin/.local/share/erigon.
--prune=hrtc
to run a full node with latest 90'000 blocks instead of an archive node. If you change your mind remember to delete the--datadir
folder content.For Gnosis Chain use
--chain=gnosis
, for Chiado testnet use--chain=chiado
.To increase download speed add
--torrent.download.rate=512mb
(default is 16mb)
To stop the Erigon node you can use the CTRL+C
command. Additional flags can be added to configure the node with several options.
Block Production (PoS Validator) is not supported/tested for Gnosis Chain (In Progress)
Last updated
Was this helpful?