Running a node on the Babylon Chain project involves several steps, such as installing necessary dependencies, configuring files, and starting the node itself. Here's a detailed guide:
Install Go: Babylon Chain is written in Go, so you need to install it on your machine. Follow the instructions on the official Go website.
Example for Linux:
wget <https://golang.org/dl/go1.16.7.linux-amd64.tar.gz>
sudo tar -C /usr/local -xzf go1.16.7.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
source ~/.profile
Install Other Dependencies:
Make sure you have make
, gcc
, git
, and other necessary tools installed.
Clone the Repository:
git clone <https://github.com/babylonchain/babylon>
cd babylon
Build the Binary:
make install
Initialize the Node:
babylond init <node_name> --chain-id babylon-chain
Copy the Genesis File: Download or copy the genesis file provided by the project to the configuration directory:
wget <GENESIS_FILE_URL>
cp <genesis_file_name>.json ~/.babylond/config/genesis.json
Configure Settings:
Open and edit the file ~/.babylond/config/config.toml
, if necessary. Ensure that the persistent_peers
and seeds
parameters are correctly set. Example:
persistent_peers = "peer_id@ip_address:port"
seeds = "seed_id@ip_address:port"
Application Configuration:
Open and edit the file ~/.babylond/config/app.toml
. Check parameters such as minimum-gas-prices
and other settings.
Start the Node:
babylond start
Check Logs: Ensure that your node connects to the network and synchronizes successfully by checking the logs:
tail -f ~/.babylond/logs/babylond.log
Create a Wallet: If you don't have a wallet, create a new one:
babylond keys add <wallet_name>
Node Management: If you want to become a validator, you will need to create a transaction to delegate tokens. Example command for delegation:
babylond tx staking create-validator \\\\
--amount=<token_amount> \\\\
--pubkey=$(babylond tendermint show-validator) \\\\
--moniker="<node_name>" \\\\
--chain-id=babylon-chain \\\\
--commission-rate="0.10" \\\\
--commission-max-rate="0.20" \\\\
--commission-max-change-rate="0.01" \\\\
--min-self-delegation="1" \\\\
--gas="auto" \\\\
--from=<wallet_name>