Guide
Here is a node installation guide (Simplified and manual)
Preparing the server for installation
sudo apt update && sudo apt upgrade -y && \
sudo apt install curl tar wget clang pkg-config libssl-dev libleveldb-dev jq build-essential bsdmainutils git make ncdu htop screen unzip bc fail2ban htop -y
Installing Go
ver="1.22.0" && \
cd $HOME && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
Build
cd $HOME
git clone https://github.com/babylonchain/babylon.git
cd babylon
git checkout v0.7.2
make install
Init your node
babylond init <YOUR MONIKER> --chain-id bbn-test-2
babylond config chain-id bbn-test-2
Create or recover your wallet
#NEW WALLET
babylond keys add <WALLET_NAME>
#RECOVER OLD WALLET
babylond keys add <WALLET_NAME> --recover
Download Genesis
wget https://github.com/babylonchain/networks/raw/main/bbn-test-2/genesis.tar.bz2
tar -xjf genesis.tar.bz2 && rm genesis.tar.bz2
mv genesis.json ~/.babylond/config/genesis.json
Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers
sed -i -e "s|^seeds *=.*|seeds = \"3f472746f46493309650e5a033076689996c8881@babylon-testnet.rpc.kjnodes.com:16459\"|" $HOME/.babylond/config/config.toml
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.00001ubbn\"|" $HOME/.babylond/config/app.toml
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
sed -i -e "s|^timeout_commit *=.*|timeout_commit = \"10s\"|" $HOME/.babylond/config/config.toml
sed -i -e "s|^key-name *=.*|key-name = \"<WALLET_NAME>\"|" $HOME/.babylond/config/app.toml
Download addrbook
wget -O $HOME/.babylond/config/addrbook.json "https://raw.githubusercontent.com/nodersteam/cosmos-adrbook/main/babylon/addrbook.json"
Create a service file
sudo tee /etc/systemd/system/babylond.service > /dev/null << EOF
[Unit]
Description=babylon-testnet node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which babylond) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Use our StateSync
peers="0764de1e08aff505db0d5c63bae7e2465bbb9050@babylon.rpc.nodersteam.com:16657"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.babylond/config/config.toml
SNAP_RPC=http://babylon.rpc.nodersteam.com:16657
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 500)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.babylond/config/config.toml
Create a BLS key
babylond create-bls-key $(babylond keys show <WALLET_NAME> -a)
Start your node
sudo systemctl daemon-reload
sudo systemctl enable babylond
sudo systemctl start babylond && sudo journalctl -u babylond -f --no-hostname -o cat
Wait for full synchronization and create a validator
babylond tx checkpointing create-validator \
--amount 1000000ubbn \
--pubkey $(babylond tendermint show-validator) \
--moniker <YOUR_MONIKER_NAME> \
--identity <YOUR_KEYBASE_ID> \
--details <YOUR_DETAILS> \
--website <YOUR_WEBSITE_URL> \
--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_NAME> \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.00001ubbn \
-y
If you want to delete a node
cd $HOME
sudo systemctl stop babylond
sudo systemctl disable babylond
sudo rm /etc/systemd/system/babylond.service
sudo systemctl daemon-reload
rm -f $(which babylond)
rm -rf $HOME/.babylond
rm -rf $HOME/babylon
Last updated