Interactive Guide
Hey node runners, to provide a comprehensive guideline for both beginners and experienced node runners, we offer two paths for you to choose from for building your node: Interactive Guide and Step-by-Step.
Interactive Guide: By selecting the configurations below, you are given a general walk-through of setting up the node based on different Operating system, Network, Execution client and Consensus client. In the current version, CLI commands are given to run as system process. Recommended for experienced node runners.
Step-by-Step: A detailed flow on running a node. Options include running as system process and using docker. Recommended for beginners.
Select a configurationβ
- Operating system:
- Linux, MacOS, Arm64
- Windows
- Network:
- Gnosis
- Chiado
- Execution client:
- Nethermind
- Erigon
- Besu
- Geth
- Consensus client:
- Lighthouse
- Lodestar
- Teku
- Nimbus
- Prysm
* disabled options: unsupported clients
Introductionβ
At a high level, we'll walk through the following flow:
- Configure an execution node using an execution-layer client.
- Configure a beacon node using a consensus-layer client.
- Configure a validator and stake GNO (optional).
Review prerequisites and best practicesβ
Node type | Benefits | Requirements |
---|---|---|
Execution + beacon |
| Check requirements section. |
Validator | Lets you stake GNO, propose + validate blocks, earn staking rewards + transaction fee tips. |
|
Step 1: Configure Serverβ
Check out all recommended steps to configure server
Create the following folder structure on your disk, the entire tutorial will assume it:
πgnosis
βββ π jwtsecret/
βββ π execution/
βββ π consensus/
βββ π data/
βββ π keystores/
βββ π validators/
mkdir gnosis && cd gnosis &&
mkdir jwtsecret && mkdir execution && mkdir consensus &&
cd consensus &&
mkdir data && mkdir keystores && mkdir validators &&
cd ..
- JWT
- IPC
Generate JWT Secret
The HTTP connection between your beacon node and execution node needs to be authenticated using a JWT token.
Use a utility like OpenSSL to create the token via command:
openssl rand -hex 32 | tr -d "\n" > "./jwtsecret/jwt.hex"
Other ways to generate the jwt.hex
file
- Use an execution or consensus client to generate the
./jwtsecret/jwt.hex
file (check their documentation). - Use an online generator like this. Copy and paste this value into a
./jwtsecret/jwt.hex
file.
For options (1) and (3), create the file by running:
echo 'PLACE_HERE_YOUR_TOKEN' > ./jwtsecret/jwt.hex
Place the jwt.hex
file in the jwtsecret folder, so it can be referenced in the next steps as ../jwtsecret/jwt.hex
for the consensus
and execution
clients.
Step 2: Run an Execution clientβ
In this step, you'll install an execution-layer client that the consensus-layer node will connect to.
- Nethermind
- Besu
- Erigon
- Geth
- Gnosis
- Chiado
- Linux, MacOS, Arm64
- Windows
-
Install dependencies
sudo apt-get update && sudo apt-get install libsnappy-dev libc6-dev libc6 unzip -y
-
Copy the download link for Linux, MacOS or Arm64 package from the Nethermind download page.
-
Download Nethermind
wget [URL_FROM_PREVIOUS_STEP]
-
Unzip the downloaded file
unzip [FILE_NAME] -d execution
-
Get into the folder
cd execution
-
Execute Nethermind
./nethermind \
--config gnosis \
--JsonRpc.Enabled true \
--HealthChecks.Enabled true \
--HealthChecks.UIEnabled true \
--JsonRpc.EnginePort=8551 \
--JsonRpc.JwtSecretFile=../jwtsecret/jwt.hex
-
Download the Windows package from the Nethermind download page.
-
Unzip the file in the
execution
folder created in the previous step. -
Navigate to the
execution
foldercd execution
-
Run the following command:
./nethermind \
--config gnosis \
--JsonRpc.Enabled true \
--HealthChecks.Enabled true \
--HealthChecks.UIEnabled true \
--JsonRpc.EnginePort=8551 \
--JsonRpc.JwtSecretFile=../jwtsecret/jwt.hex
- Linux, MacOS, Arm64
- Windows
-
Install dependencies
sudo apt-get update && sudo apt-get install libsnappy-dev libc6-dev libc6 libicu-dev unzip wget openssl git -y
-
Copy the download link for Linux, MacOS or Arm64 package from the Nethermind download page.
-
Download Nethermind
wget [URL_FROM_PREVIOUS_STEP]
-
Unzip the downloaded file
unzip [FILE_NAME] -d execution
-
Get into the folder
cd execution
-
Execute Nethermind
./nethermind \
--config chiado \
--JsonRpc.Enabled true \
--HealthChecks.Enabled true \
--HealthChecks.UIEnabled true \
--JsonRpc.EnginePort=8551 \
--JsonRpc.JwtSecretFile=../jwtsecret/jwt.hex
-
Download the Windows package from the Nethermind download page.
-
Unzip the file in the
execution
folder created in the previous step. -
Navigate to the
execution
foldercd execution
-
Run the following command:
./nethermind \
--config chiado \
--JsonRpc.Enabled true \
--HealthChecks.Enabled true \
--HealthChecks.UIEnabled true \
--JsonRpc.EnginePort=8551 \
--JsonRpc.JwtSecretFile=../jwtsecret/jwt.hex
Remove AuraMerge.Enabled
since it is now covered in the Merge.Enabled
key.
Besu is not yet supported, use Nethermind instead.
- Gnosis
- Chiado
- Linux, MacOS, Arm64
- Windows
- Install and build Erigon.
cd execution
git clone --branch stable --single-branch https://github.com/ledgerwatch/erigon.git
cd erigon
make erigon
- Run Erigon
./build/bin/erigon \
--chain=gnosis \
--datadir=/data \
--authrpc.jwtsecret=../../jwtsecret/jwt.hex \
--prune=htcr
- Erigon run Archive node by default. To run a pruned node, add
--prune=htcr
.
- Install and build Erigon.
cd execution
git clone --branch stable --single-branch https://github.com/ledgerwatch/erigon.git
cd erigon
make erigon
- Run Erigon
./build/bin/erigon \
--chain=gnosis \
--datadir=/data \
--authrpc.jwtsecret=../../jwtsecret/jwt.hex
- Linux, MacOS, Arm64
- Windows
- Install and build Erigon.
cd execution
git clone --branch stable --single-branch https://github.com/ledgerwatch/erigon.git
cd erigon
make erigon
- Run Erigon
./build/bin/erigon \
--chain=chiado \
--datadir=/data \
--authrpc.jwtsecret=../../jwtsecret/jwt.hex
- Install and build Erigon.
cd execution
git clone --branch stable --single-branch https://github.com/ledgerwatch/erigon.git
cd erigon
make erigon
- Run Erigon
./build/bin/erigon \
--chain=chiado \
--datadir=/data \
--authrpc.jwtsecret=../../jwtsecret/jwt.hex
Geth is not yet supported, use Nethermind instead.
Step 3: Run a Beacon Nodeβ
- Lighthouse
- Lodestar
- Teku
- Nimbus
- Prysm
- Gnosis
- Chiado
- Linux, MacOS, Arm64
- Windows
-
Go to the lighhouse releases page and copy the url of the latest release based on your OS version.
-
Download the lighthouse-VERSION-ARQ.tar.gz binary.
wget [URL_FROM_PREVIOUS_STEP]
-
Extract the downloaded file
tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus
-
Get into the folder
cd consensus
-
Execute Lighthouse
./lighthouse \
--network gnosis beacon_node \
--datadir=data \
--http \
--execution-endpoint http://localhost:8551 \
--execution-jwt ../jwtsecret/jwt.hex \
--checkpoint-sync-url "https://checkpoint.gnosischain.com"
Lighthouse only runs on Linux. To run it on Windows, Install Linux on Windows with WSL, and follow the instructions on the WSL terminal.
-
Go to the lighhouse releases page and copy the url of the latest release based on your OS version.
-
Download the lighthouse-VERSION-ARQ.tar.gz binary.
wget [URL_FROM_PREVIOUS_STEP]
-
Extract the downloaded file
tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus
-
Get into the folder
cd consensus
-
Execute Lighthouse
./lighthouse \
--network gnosis beacon_node \
--datadir=data \
--http \
--execution-endpoint http://localhost:8551 \
--execution-jwt ../jwtsecret/jwt.hex \
--checkpoint-sync-url "https://checkpoint.gnosischain.com"
- Linux, MacOS, Arm64
- Windows
-
Go to the lighhouse releases page and copy the url of the latest release based on your OS version.
-
Download the lighthouse-VERSION-ARQ.tar.gz binary.
wget [URL_FROM_PREVIOUS_STEP]
-
Extract the downloaded file
tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus
-
Get into the folder
cd consensus
-
Clone Gonsis Chain configuration repository from github
git clone https://github.com/gnosischain/configs.git
-
Run Lighthouse beacon node
./lighthouse bn \
--network chiado \
--execution-endpoints=http://localhost:8551 \
--execution-jwt=../jwtsecret/jwt.hex \
--checkpoint-sync-url https://checkpoint.chiadochain.net \
--disable-deposit-contract-sync
Lighthouse only runs on Linux. To run it on Windows, Install Linux on Windows with WSL, and follow the instructions on the WSL terminal.
-
Go to the lighhouse releases page and copy the url of the latest release based on your OS version.
-
Download the lighthouse-VERSION-ARQ.tar.gz binary.
wget [URL_FROM_PREVIOUS_STEP]
-
Extract the downloaded file
tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus
-
Get into the folder
cd consensus
-
Clone Gonsis Chain configuration repository from github
git clone https://github.com/gnosischain/configs.git
-
Run Lighthouse beacon node
./lighthouse bn \
--network chiado \
--execution-endpoints=http://localhost:8551 \
--execution-jwt=../jwtsecret/jwt.hex \
--checkpoint-sync-url https://checkpoint.chiadochain.net \
--disable-deposit-contract-sync
- Gnosis
- Chiado
- Linux, MacOS, Arm64
- Windows
- Clone the repo locally
git clone https://github.com/chainsafe/lodestar.git
- Install and build all the packages
cd lodestar
yarn install
yarn build
Your repo will look like this
πgnosis
βββ π jwtsecret/
βββ π execution/
βββ π consensus/
βββ π lodestar/
βββ π data/
βββ π keystores/
βββ π validators/
Check that you are install correctly by running `./lodestar --help'
- Execute Lodestar Beacon Chain
./lodestar beacon \
--network=gnosis \
--execution.urls=http://localhost:8551 \
--jwt-secret=../../jwtsecret/jwt.hex \
--metrics=true \
--metrics.port=8008 \
--checkpointSyncUrl=https://checkpoint.gnosischain.com/
Lodestar only runs on Linux. To run it on Windows, Install Linux on Windows with WSL, and follow the instructions on the WSL terminal.
- Clone the repo locally
git clone https://github.com/chainsafe/lodestar.git
- Install and build all the packages
cd lodestar
yarn install
yarn build
Your repo will look like this
πgnosis
βββ π jwtsecret/
βββ π execution/
βββ π consensus/
β ββ π lodestar/
βββ π data/
βββ π keystores/
βββ π validators/
Check that you are install correctly by running `./lodestar --help'
- Execute Lodestar Beacon Chain
./lodestar beacon \
--network=gnosis \
--execution.urls=http://localhost:8551 \
--jwt-secret=../../jwtsecret/jwt.hex \
--metrics=true \
--metrics.port=8008 \
--checkpointSyncUrl=https://checkpoint.gnosischain.com/
- Linux, MacOS, Arm64
- Windows
Lodestar doesn't support Chiado at the moment.
Lodestar doesn't support Chiado at the moment.
- Gnosis
- Chiado
- Linux, MacOS, Arm64
- Windows
Prerequisitesβ
- Java 11+
Install and Runβ
-
Go to the Teku release page and copy the url of the binary distribution under Downloads section.
-
Download the teku Source code .tar.gz binary.
wget [URL_FROM_PREVIOUS_STEP]
-
Extract the downloaded file and move under consensus directory
tar -xvf VERSION.tar.gz --directory consensus
-
Get into the teku folder
cd consensus && cd teku-${version}
Your repo will look like this
πgnosis
βββ π jwtsecret/
βββ π execution/
βββ π consensus/
βββ π teku-${version}/
βββ π data/
βββ π keystores/
βββ π validators/
If you're installing on macOS with Homebrew, check out here.
Check that you are installing correctly by running `./bin/teku --help'
You can run both beacon and validator with a single command. If you wish to run with a single command, skip to step 4: Run a validator.
- Execute beacon node(Optional)
./bin/teku \
--network=gnosis \
--ee-endpoint=http://localhost:8551 \
--ee-jwt-secret-file=${PATH_TO_JWT_SECRET} \
--metrics-enabled=true \
--rest-api-enabled=true \
--initial-state=${checkpoint url} \
Get the latest checkpoint url at https://checkpoint.gnosis.gateway.fm/.
Prerequisitesβ
Install and Runβ
-
Go to the Teku release page and copy the url of the binary distribution under Downloads section.
-
Download the teku Source code .tar.gz binary.
wget [URL_FROM_PREVIOUS_STEP]
-
Extract the downloaded file and move under consensus directory
tar -xvf VERSION.tar.gz --directory consensus
-
Get into the teku folder
cd consensus && cd teku-${version}
Your repo will look like this
πgnosis
βββ π jwtsecret/
βββ π execution/
βββ π consensus/
βββ π teku-${version}/
βββ π data/
βββ π keystores/
βββ π validators/
If you're installing on macOS with Homebrew, check out here.
Check that you are installing correctly by running `bin\teku --help'
You can run both beacon and validator with a single command. If you wish to run with a single command, skip to step 4: Run a validator.
- Execute beacon node(Optional)
./bin/teku \
--network=gnosis \
--ee-endpoint=http://localhost:8551 \
--ee-jwt-secret-file=${PATH_TO_JWT_SECRET} \
--metrics-enabled=true \
--rest-api-enabled=true \
--initial-state=${checkpoint url} \
Get the latest checkpoint url at https://checkpoint.gnosis.gateway.fm/.
- Linux, MacOS, Arm64
- Windows
Teku doesn't support Chiado at the moment.
Teku doesn't support Chiado at the moment.
- Gnosis
- Chiado
- Linux, MacOS, Arm64
- Windows
Please refer to Run a Beacon Node: Nimbus
Please refer to Run a Beacon Node: Nimbus
- Linux, MacOS, Arm64
- Windows
Please refer to Run a Beacon Node: Nimbus
Please refer to Run a Beacon Node: Nimbus
Please refer to Run a Beacon Node: Prysm
Step 4: Run a Validatorβ
- Gnosis
- Chiado
Step 4a: Generate Validator Keysβ
We highly recommend generating keystores on a safe, completely offline device.
Securely backup your mnemonic, keystores, and password and keep them in a safe place.
Learn more about keys and withdrawal credentials.
- Linux, MacOS, Arm64
- Windows
-
Copy the download link for Linux, MacOS or Arm64 package from the validator data generation tool.
-
Download the Validator Data Generation tool
wget [URL_FROM_PREVIOUS_STEP]
-
Unzip the downloaded file
tar -xvf [FILE_NAME]
-
Get into the folder
cd deposit-cli-...
-
Execute Validator Data Generation tool and follow the instructions. In case of doubts, check the tool documentation.
Tip: add the
--eth1_withdrawal_address
flag when creating your keys, pointing to an address you control.-
If you want to generate a new mnemonic:
./deposit new-mnemonic --folder ../consensus/keystores
-
If you already have a mnemonic generated:
./deposit existing-mnemonic --folder ../consensus/keystores
You will be asked for a
mnemonic
andindex
(key number).
-
-
Download the Windows version of the Validator Data Generation tool from the releases page.
-
Execute Validator Data Generation tool and follow the instructions. In case of doubts, check the tool documentation
-
If you want to generate a new mnemonic:
deposit.exe new-mnemonic --folder ../consensus/keystores
-
If you already have a mnemonic generated:
deposit.exe existing-mnemonic --folder ../consensus/keystores
You will be asked for a
mnemonic
andindex
(key number).
-
- Select the language of the UI and mnemonic.
- Choose the number of validators. Remember: 1 GNO = 1 validator. You can run many validators in the same machine.
- Gnosis
- Chiado
gnosis
on the network/chain name.chiado
on the network/chain name.- Create a password to encrypt the keys.
- The mnemonic (seed phrase) will show on screen. Save it in a secure place (idealy offline).
- Type your mnemonic to confirm in the tool.
- Wait until the keys are created. Two types of files will be generated:
deposit_data-*.json
- One
keystore-*.json
per validator
- Save the location of the generated keys, and copy them in a backup USB memory or any other secure storage.
For custom setup and more instructions, check the Validator Data Generation tool documentation.
Step 4b: Run a Validatorβ
- Lighthouse
- Lodestar
- Nimbus
- Prysm
- Teku
- Linux, MacOS, Arm64
- Windows
Lighthouse only runs on Linux. To run it on Windows, Install Linux on Windows with WSL, and follow the instructions on the WSL terminal.
- Gnosis
- Chiado
To run a validator, we need to first import the keys generated in the previous step.
- In a new command line window, navigate to the
consensus
folder and execute Lighthouse validator client - To ease the import process, we will create a
password.txt
file containing the password used to encrypt the validator keys.
echo 'PLACE_HERE_YOUR_PASSWORD' > keystores/password.txt
- Import the validator keys using lighthouse:
./lighthouse account_manager validator import \
--network gnosis \
--password-file keystores/password.txt \
--reuse-password \
--directory keystores \
--datadir validators
- Start your lighhouse validator:
./lighthouse validator_client \
--network gnosis \
--datadir validators \
--enable-doppelganger-protection \
--suggested-fee-recipient="0x0" \
--metrics \
--metrics-address=0.0.0.0 \
--metrics-port=5064 \
--graffiti "gnosis-docs-graffiti"
Replace suggested-fee-recipient
with your Gnosis address. This fee recipient address will receive tips from user transactions from the block the validator proposed. If not set, the tips will be sent to zero address, that is burnt competely. It is strongly recommended that you configure this value in your setup.
Learn more about suggested fee recipient flag in Lighthouse docs.
Replace graffiti
with your own graffiti. It is an optional field that can be used to add a message to the block by the proposer.
- Linux, MacOS, Arm64
- Windows
Lodestar only runs on Linux. To run it on Windows, Install Linux on Windows with WSL, and follow the instructions on the WSL terminal.
- Gnosis
- Chiado
To run a validator, we need to first import the keys generated in the previous step.
- In a new command line window, navigate to the
consensus
folder and execute Lodestar validator client - To ease the import process, we will create a
password.txt
file containing the password used to decrypt the validator keys.
echo 'PLACE_HERE_YOUR_PASSWORD' > keystores/password.txt
You can import the keys when starting the validator.
- Import the validator keys using Lodestar:
./lodestar validator \
--network=gnosis \
--importKeystores=keystores \
--importKeystoresPassword=keystores/password.txt \
--dataDir=/data/validators \
--suggestedFeeRecipient=${FEE_RECIPIENT} \
--graffiti=${GRAFFITI}
Replace suggestedFeeRecipient
with your Gnosis address. This fee recipient address will receive tips from user transactions from the block the validator proposed. If not set, the tips will be sent to zero address, that is burnt completely. It is strongly recommended that you configure this value in your setup.
Learn more about suggestedFeeRecipient flag in Lodestar docs.
Replace graffiti
with your own graffiti. It is an optional field that can be used to add a message to the block by the proposer.
Please refer to Run a Beacon Node: Nimbus
Please refer to Run a Beacon Node: Prysm
- Linux, MacOS, Arm64
- Windows
If you're using Windows, please Install Linux on Windows with WSL, and follow the instructions on the WSL terminal.
- Gnosis
- Chiado
To run a validator, we need to first import the keys generated in the previous step.
- In a new command line window, navigate to the
consensus
folder and execute Teku validator client - To ease the import process, we will create a password txt file containing the password used to encrypt the validator keys.
echo 'PLACE_HERE_YOUR_PASSWORD' > keystores/keystore-${m_...}.json.txt
If the Launchpad creates a key named keystore-m_12381_3600_0_0_0-1596485378.json, then the password file must be named keystore-m_12381_3600_0_0_0-1596485378.txt to comply with EIP-2335
You can import the keys when starting the validator.
- navigate to teku folder
cd teku-${version}
- Execute Teku Beacon Chain and Validator(s):
./bin/teku \
--network=gnosis \
--ee-endpoint=http://localhost:8551 \
--ee-jwt-secret-file=${PATH_TO_JWT_SECRET} \
--metrics-enabled=true \
--rest-api-enabled=true \
--initial-state=https://checkpoint.gnosis.gateway.fm//eth/v2/debug/beacon/states/finalized \
--validators-proposer-default-fee-recipient=${Fee Recipient Address} \
--validator-keys=${path to key file}:${path to password file}
--validators-graffiti=${GRAFFITI}
If you wish to run validator only, run the following command:
./bin/teku validator-client \
--network=gnosis \
--beacon-node-api-endpoint=${endpoint} \
--validator-keys=${path to key file}:${path to password file}
Replace validators-proposer-default-fee-recipient
with your Gnosis address. This fee recipient address will receive tips from user transactions from the block the validator proposed. If not set, the tips will be sent to zero address, that is burnt competely. It is strongly recommended that you configure this value in your setup.
Learn more about validators-proposer-default-fee-recipient flag in Teku docs.
Replace validator-keys
with the location where keystores- *.json
and keystore- *.txt
are stored, and beacon-node-api-endpoint
with the endpoint of the beacon nodeβs REST API (default is http://127.0.0.1:5051).
Replace validators-graffiti
with your own graffiti. It is an optional field that can be used to add a message to the block by the proposer.
Learn more about the CLI commands and their options here.
Step 4c: Fund your validatorβ
Follow the instructions in the Fund Validator page.
Available options:
Step 4d: Verify Validatorβ
After depositing and starting your validator, your validator will go through a process of becoming active.
Image: Process of Validator Activation
You can verify the status of your validators following these steps:
- Navigate to the deposit tool and click on the
Validator Status
tab.
- Upload your
deposit_data.json
file used during the deposit step.
- Check the status of all your validators included in the
deposit_data.json
file.
- Optionally, click on the
import all validators into the Beacon Chain Explorer Dashboard
to see detailed status of your validators.
- The Gnosis Beacon Chain Explorer is a fork of the Ethereum Beaconcha.in explorer.
See more about the validator statuses and Deposit Process in the Beaconcha.in Knowledge Base.
Chiado testnet does not support public participation yet.
Step 4 is omitted.