;

Guide to running Babylon Node - Getting Set Up

Airdrop

Posted by Thanh Dat - 19/01/2024

CryptoViet Info

    MỤC LỤC

In this comprehensive article, you will find a step-by-step guide that walks you through the process of running a Babylon Node. Whether you're a beginner or an experienced user, this guide is designed to help you navigate the intricacies of setting up and running your Babylon Node with precision and ease. Follow along to ensure a smooth and successful experience as you embark on this essential aspect of managing your Babylon Node.

This article provides a step-by-step guide on how to properly run a Babylon Node. Let's follow CryptoViet Info for more!

Requirements

To run the Babylon node, you need to meet the following conditions:

  • 4 vCPU Cores
  • 8 GB RAM
  • 50 GB NVMe or 200 GB SSD

Guide to running Babylon Node

Setup & Install dependencies


sudo apt update && sudo apt update -y 
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade

Setup Validator Name

MONIKER="ABCD"

Note: ABCD = name_validator_you_choose

install Go


sudo rm -rf /usr/local/go 
curl -Ls https://go.dev/dl/go1.20.12.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Download project and build Binaries


cd $HOME 
rm -rf babylon
git clone https://github.com/babylonchain/babylon.git
cd babylon
git checkout v0.7.2

 

Build binaries

make build

Binaries for Cosmovisor


mkdir -p $HOME/.babylond/cosmovisor/genesis/bin 
mv build/babylond $HOME/.babylond/cosmovisor/genesis/bin/
rm -rf build

Application


sudo ln -s $HOME/.babylond/cosmovisor/genesis $HOME/.babylond/cosmovisor/current -f 
sudo ln -s $HOME/.babylond/cosmovisor/current/bin/babylond /usr/local/bin/babylond -f

Let’s install Cosmovisor and create service

Download and install cosmovisor

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0

Create service with babylon


sudo tee /etc/systemd/system/babylon.service > /dev/null << EOF 
[Unit]
Description=babylon node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.babylond"
Environment="DAEMON_NAME=babylond"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.babylond/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF

Enable service


sudo systemctl daemon-reload 
sudo systemctl enable babylon.service

Setup the node configure


babylond config chain-id bbn-test-2 
babylond config keyring-backend test
babylond config node tcp://localhost:16457

Initial node

babylond init "ABCD" --chain-id bbn-test-2

Note: ABCD = name_validator_you_choose

Download genesis and addrbook

curl -Ls https://snapshots.kjnodes.com/babylon-testnet/genesis.json > $HOME/.babylond/config/genesis.json
curl -Ls https://snapshots.kjnodes.com/babylon-testnet/addrbook.json > $HOME/.babylond/config/addrbook.json

Add seeds

sed -i -e "s|^seeds *=.*|seeds = \"3f472746f46493309650e5a033076689996c8881@babylon-testnet.rpc.kjnodes.com:16459\"|" $HOME/.babylond/config/config.toml

Set minimum gas price

sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.00001ubbn\"|" $HOME/.babylond/config/app.toml

Set pruning


sed -i \ 
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/.babylond/config/app.toml

Set custom ports

sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:16458\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:16457\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:16460\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:16456\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":16466\"%" $HOME/.babylond/config/config.toml
sed -i -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://0.0.0.0:16417\"%; s%^address = \":8080\"%address = \":16480\"%; s%^address = \"localhost:9090\"%address = \"0.0.0.0:16490\"%; s%^address = \"localhost:9091\"%address = \"0.0.0.0:16491\"%; s%:8545%:16445%; s%:8546%:16446%; s%:6065%:16465%" $HOME/.babylond/config/app.toml

Download latest chain snapshot


curl -L https://snapshots.kjnodes.com/babylon-testnet/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.babylond 
[[ -f $HOME/.babylond/data/upgrade-info.json ]] && cp $HOME/.babylond/data/upgrade-info.json $HOME/.babylond/cosmovisor/genesis/upgrade-info.json

Start Service and Check logs 

sudo systemctl start babylon.service && sudo journalctl -u babylon.service -f --no-hostname -o cat

After 5 seconds, please press Ctrl + C to exit the logs.

Create Validator Node

Add new wallet

babylond keys add wallet

Please save all information when creating this wallet including the pharse to restore the wallet. If lost, it cannot be recovered. Do not share the pharse with anyone.

Faucet token testnet

Please join Babylon discord: https://discord.gg/babylonglobal. Afterwards, you need to verify the user and get the Tech role.

Go to room faucet & faucet BBN token with command line is: !faucet bbxxx…xxx (bbxxx…xxx is a your address wallet)

Create a BLS keys

babylond create-bls-key $(babylond keys show wallet -a)

Restart your node to load this key into memory

sudo systemctl restart babylon.service

Modify configure


sed -i -e "s|^key-name *=.*|key-name = \"wallet\"|" $HOME/.babylond/config/app.toml 
sed -i -e "s|^timeout_commit *=.*|timeout_commit = \"10s\"|" $HOME/.babylond/config/config.toml

Check network synchronization status.

babylond status | jq .SyncInfo

Please wait for syncing for approximately 24 hours. You can create a validator if the status check shows as below.

babylond status 2>&1 | jq .SyncInfo.catching_up

Babylon-02.jpg

If SyncInfo = true, creating a validator will encounter an error.

Create Validator


babylond tx checkpointing create-validator \ 
--amount 1000000ubbn \
--pubkey $(babylond tendermint show-validator) \
--moniker "ABCD" \
--details " hello I’m Stevendo and very handsome" \
--chain-id bbn-test-2 \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.00001ubbn \
-y

Note: ABCD = name_validator_you_choose

You can check your Validator status here. Please allow some time for your validator to be added to the Babylon Validator list: https://babylon.explorers.guru/validators 

If you want to remove babylond, just this:


m -rf babylon/ 
rm -rf .babylond
systemctl stop babylon.service
systemctl disable babylon.service

Conclusion

We have completed the Guide to running Babylon Node. If you encounter any errors while running Babylon Node, please join our Telegram group for assistance.

DISCLAIMER: Thông tin trên trang web này chỉ được cung cấp cho mục đích thông tin và không đại diện cho lời khuyên đầu tư. Để đưa ra quyết định đầu tư, chúng tôi khuyên bạn nên tự nghiên cứu.

Có thể bạn sẽ quan tâm

Recent PostPopular Post
Categories
Follow Us
CryptoViet Info
CryptoViet Info
CryptoViet Info
CryptoViet Info
CryptoViet Info
CryptoViet Info
CryptoViet Info
CryptoViet Info
CryptoViet Info
©2017 CryptoViet Info. All Rights ReservedMedia Kit