Running a validator node in the Babylon project involves several steps: setting up the environment, configuring the node, and ensuring it runs efficiently. This guide provides detailed instructions to help you through the process.
Update and Upgrade the System:
bashCode kopiëren
sudo apt update && sudo apt upgrade -y
Install Go:
bashCode kopiëren
wget <https://golang.org/dl/go1.17.6.linux-amd64.tar.gz>
sudo tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
source ~/.profile
Install Required Packages:
bashCode kopiëren
sudo apt install build-essential jq -y
Clone the Repository:
bashCode kopiëren
git clone <https://github.com/babylonchain/babylon.git>
cd babylon
Build the Binary:
bashCode kopiëren
make install
Initialize the Node:
bashCode kopiëren
babylond init <your_node_name> --chain-id babylon-1
Download Genesis File:
Obtain the genesis file from the Babylon project and place it in the ~/.babylond/config
directory:
bashCode kopiëren
wget <https://raw.githubusercontent.com/babylonchain/babylon/main/genesis.json> -O ~/.babylond/config/genesis.json
Configure the Node:
~/.babylond/config/config.toml
and set persistent_peers
and seeds
with peers from the Babylon network.Configure Minimum Gas Prices:
Open ~/.babylond/config/app.toml
and set minimum-gas-prices
:
tomlCode kopiëren
minimum-gas-prices = "0.025ubbn"
Add Your Validator Key:
bashCode kopiëren
babylond keys add <your_validator_name> --keyring-backend os
Start the Node:
bashCode kopiëren
babylond start
Create a Validator:
After your node is synchronized, create a validator:
bashCode kopiëren
babylond tx staking create-validator \\
--amount=1000000ubbn \\
--pubkey=$(babylond tendermint show-validator) \\
--moniker="<your_node_name>" \\
--chain-id=babylon-1 \\
--commission-rate="0.10" \\
--commission-max-rate="0.20" \\
--commission-max-change-rate="0.01" \\
--min-self-delegation="1" \\
--from=<your_validator_name> \\
--keyring-backend=os