🌍Babylon Chain: Setting Up Your Validator Node (bbn-test-2)
Update 2024–02–24: The previous chain, bbn-test-2, has been replaced by the new Bitcoin staking network, bbn-test-3. For the latest information and setup instructions, please refer to my new guide.
Introducing Babylon Chain: Unlocking the Future of Bitcoin Staking
The Babylon Protocol revolutionizes Bitcoin staking by enabling Bitcoin holders to directly stake their assets on Proof-of-Stake (PoS) blockchains. This innovative approach eliminates the need for third-party custody, bridges, or wrapping, streamlining the process significantly. The protocol ensures robust economic security for PoS chains, providing slashable guarantees while also offering an efficient unbonding mechanism to enhance Bitcoin liquidity. Designed for versatility, the Babylon Protocol functions as a modular plug-in, seamlessly integrating with a variety of PoS consensus protocols. Its adaptability makes it an essential tool for developing advanced restaking protocols. For Bitcoin holders, this means an opportunity to bolster the security of PoS chains and decentralized applications (dApps) while concurrently earning staking rewards.
The Babylon Network’s cornerstone application, built on the Cosmos SDK, is the BabylonD application. Currently in its testnet phase, the project has demonstrated remarkable potential, successfully securing $18 million in funding from numerous prominent venture capital firms. This early financial support underscores the significant interest and confidence in the Babylon Network’s innovative approach and future prospects.
Please consider this guide as a resource for educational purposes and to contribute to Babylon networks robustness. I advise against setting up a node solely for airdrop incentives, given their uncertain nature.
Part 1: Order and configure your VPS
To get started with installing your node, you’ll first need to rent a VPS (Virtual Private Server). Using a VPS offers several advantages, such as enhanced performance, scalability and reliability. I’ll guide you through the process of renting a VPS at a lower cost, and show you how to configure it. Follow the steps below to get your VPS ready for the node installation. Research VPS providers: Take some time to explore different VPS providers available in the market. Consider factors like pricing, reputation, and customer reviews to find the right fit for your needs. Look for plans that offer the appropriate amount of resources (CPU, RAM, storage) to support your node. Contabo is my preferred choice due to their combination of affordable pricing, reliable performance, and user-friendly interface.
I personally use and trust Contabo for my blockchain nodes. I’ve recently joined their affiliate program to recommend their services. If you decide to use my affiliate links for Contabo, you’ll be supporting my work at no extra cost to you. This support is important for continuing our journey together in the fascinating world of crypto, and using these affiliate links is a direct and impactful way to back my efforts. Thank you very much for your support!
Minimum hardware specifications needed for this node:
4 CPU
16 GB RAM
500 GB SSD
Given the hardware requirements, I suggest opting for the Cloud VPS 2 package, as it offers a suitable balance of performance and efficiency for these needs.
I will initially select a rental period of 1 month, with the flexibility to extend it later if needed:
Make sure to choose the option “European Union (Germany)”:
For the best storage solution, I recommend selecting the 200GB SSD storage type.
To access Docker with Ubuntu 22.04, navigate to the “Apps & Panels” section and make the appropriate selection:
To prioritize security, I highly recommend to generate a password and securely store it to ensure maximum protection:
For the final step, it’s recommended to leave the sections titled “Object Storage”, “Networking”, and “Add-Ons” in their default state without any modifications. If you are new to Contabo, please create an account; otherwise, login using your existing credentials. Provide your personal data by filling in the required fields. Complete the remaining fields with your personal information, and click the “Next” button to proceed with the payment. After successfully completing the payment for your order, you will receive an initial email. Within approximately 15 minutes, you will receive a second email containing all the information needed to connect to your VPS.
Part 2: Connect to your VPS via SSH
Download and install most recent edition of PuTTY by visiting the official website:
You will find the IP adress of your VPS in the second email. Launch PuTTY, enter the IP address of your VPS and click “Open”:
Once the server interface is open, you will be prompted to provide login details; simply enter “root” as the user and use your chosen password:
Congratulations! You are now successfully logged into your server:
Part 3: Preparations
To continue, we can update the packages by running the following commands in the terminal. The first part of the command (sudo apt update) updates the package lists for upgrades, and the second part (sudo apt upgrade -y) actually performs the upgrades with the “-y” flag allowing for automatic confirmation of prompts during the upgrade process:
sudo apt update && sudo apt upgrade -y
Part 4: Setup Validator Name
First change “YOUR_MONIKER_GOES_HERE” to your chosen validator moniker and enter this command:
MONIKER="YOUR_MONIKER_GOES_HERE"
Part 5: Install Dependencies & Install GO
# Install Build Tools
sudo apt -qy install curl git jq lz4 build-essential
# Install GO
ver="1.22.0"
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
Part 6: Download And Build Binaries
# Clone project repository
cd $HOME
rm -rf babylon
git clone https://github.com/babylonchain/babylon.git
cd babylon
git checkout v0.8.3
# Build binaries
make build
# Prepare binaries for Cosmovisor
mkdir -p ~/.babylond
mkdir -p ~/.babylond/cosmovisor
mkdir -p ~/.babylond/cosmovisor/genesis
mkdir -p ~/.babylond/cosmovisor/genesis/bin
mkdir -p ~/.babylond/cosmovisor/upgrades
mv build/babylond $HOME/.babylond/cosmovisor/genesis/bin/
rm -rf build
# Create application symlinks
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
Part 7: Set Up Cosmovisor And Create The Corresponding Service
# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
# Create and start service
sudo tee /etc/systemd/system/babylond.service > /dev/null <<EOF
[Unit]
Description=Babylon daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --x-crisis-skip-assert-invariants
Restart=always
RestartSec=3
LimitNOFILE=infinity
Environment="DAEMON_NAME=babylond"
Environment="DAEMON_HOME=${HOME}/.babylond"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable babylond.service
Part 8: Initialize The Node
# Initialize the node
babylond init $MONIKER --chain-id bbn-test-3
# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"49b4685f16670e784a0fe78f37cd37d56c7aff0e@3.14.89.82:26656,9cb1974618ddd541c9a4f4562b842b96ffaf1446@3.16.63.237:26656\"|" $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
# Switch to signet
sed -i -e "s|^network *=.*|network = \"signet\"|" $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
Part 9: Retrieve The Genesis File:
wget https://github.com/babylonchain/networks/raw/main/bbn-test-3/genesis.tar.bz2
tar -xjf genesis.tar.bz2 && rm genesis.tar.bz2
mv genesis.json ~/.babylond/config/genesis.json
Part 10: Start Service And Check The Logs
sudo systemctl start babylond.service && sudo journalctl -u babylond.service -f --no-hostname -o cat
Part 11: Becoming a Validator
- Keyring creation and getting funds: Validators are required to have funds for two reasons:
- Self-delegation: Validators must stake their own funds as a commitment to the network.
- Transaction fees: Funds are necessary to cover the costs of submitting BLS signature transactions.
Presently, validators are limited to using the test keyring backend. However, Babylon plans to expand support to include various encrypted backends offered by the Cosmos SDK in the future.
Part 11a: Create a New Key
babylond keys add wallet
Part 11b: Obtain Funds from the Babylon Testnet Faucet
To receive funds, visit the #faucet channel on the official Babylon Discord server. Here, you can request funds by sharing the address you previously created. Please note, in order to access the #faucet channel, you first need to visit the “get-a-role” channel and react with the “Computer” emoji. This action will grant you the necessary permissions to view the #faucet channel. Once in the channel, submit your request by typing !faucet
followed by your address. For instance, you would type this to request funds for that specific address:
!faucet bbn16yzx3zfucs6fxu4hw3ack6ht4hgsp9wqrly2c9
You can check your wallet balance using this command:
babylond q bank balances $(babylond keys show wallet -a)
Ensure that you have successfully received 1,100,000 ubbn. Please be aware that you can only claim 1 BBN from the faucet every 24 hours.
Part 11c: Generate a BLS Key Pair
As a validator, you are required to provide a BLS signature at the conclusion of each epoch. For this purpose, it’s essential to possess a BLS key pair, which will be used for signing information. This should be done using the address that was established in the preceding step.
babylond create-bls-key $(babylond keys show wallet -a)
Executing this command will generate a BLS key, which will then be stored in the $HOME/.babylond/config/priv_validator_key.json
file. This file also contains the private key used by the validator for block signing. It's crucial to secure this file adequately to maintain the integrity and security of your validator operations. After creating a BLS key, you need to restart your node to load this key into memory.
Part 11d: Update the Configuration Settings
Additionally, it’s necessary to define the name of the key your validator will utilize for submitting BLS signature transactions. This is done in the $HOME/.babylond/config/app.toml
file. You should edit this file to assign the key name to the one associated with the funds in your keyring.
sed -i -e "s|^key-name *=.*|key-name = \"wallet\"|" $HOME/.babylond/config/app.toml
Lastly, it is highly advisable to adjust the timeout_commit
parameter in the $HOME/.babylond/config/config.toml
file. This setting determines the duration a validator waits before committing a block and proceeding to a new height. In alignment with Babylon's goal of maintaining a 10-second interval between blocks, you should configure this value accordingly.
sed -i -e "s|^timeout_commit *=.*|timeout_commit = \"10s\"|" $HOME/.babylond/config/config.toml
Part 12: Create the Validator
Unlike traditional Cosmos SDK chains, establishing a validator on Babylon requires using the babylond tx checkpointing create-validator
command. This process assumes the presence of a BLS validator key in the $HOME/.babylond/config/priv_validator_key.json
file.
Babylon validators have the responsibility to submit a BLS signature transaction at the end of each epoch, which currently occurs approximately every 30 minutes. These transactions incur a fixed gas fee of 100ubbn. Consequently, it’s crucial for validators to ensure they have sufficient unbonded funds in their keyring to cover these recurring transaction fees.
Check the network synchronization status with the command:
babylond status | jq .SyncInfo
As soon as the value of catching_up becomes “false”, you can proceed to the final step.
# Make sure you have adjusted **moniker**, **details** and **website** to match your values.
babylond tx checkpointing create-validator \
--amount 1000000ubbn \
--pubkey $(babylond tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id bbn-test-3 \
--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
To achieve active validator status, it’s essential to bond more ubbn tokens than the current lowest-bonded validator in the ranking (unless the validator set isn’t full). Additionally, you must have a minimum of 10,000,000 ubbn tokens bonded.
Congratulations! You’ve successfully become a validator on the Babylon network. Usually it within 30 minutes, the validator should appear in the list at https://babylon.explorers.guru/validators. However, due to network congestion, there might be delays sometimes. You can find your validator by searching for the wallet address or your Moniker, and then see it in the delegations to your validator on this wallet.
Please keep in mind that your node will initially be listed as “inactive” when it first appears:
In order to become an active validator, you need to have more ubbn tokens bonded than the last validator, so to have more voting power than the last validator, which is 380 BBN at the moment of writing. Therefore, you need to obtain a lot of testnet tokens from the faucet and then delegate these tokens to your node by using the following command:
babylond tx epoching delegate $(babylond keys show wallet -a --bech val) 1100000ubbn --from wallet --chain-id bbn-test-3 --gas-adjustment 1.4 --gas auto --fees 150ubbn -y
If you encounter any issues, I recommend consulting the official documentation first. You can also refer to the handy cheat sheet provided by Node Jumper. If you still need assistance, feel free to post your questions in the “Development” channel on the official Discord server. Alternatively, you’re always welcome to reach out to me directly for assistance.
Part 13: Unjailing Your Validator
If your validator gets jailed, you can discover the reason by using the command:
babylond query slashing signing-info $(babylond tendermint show-validator)
To unjail your validator, use this command:
babylond tx slashing unjail --from wallet --chain-id bbn-test-3 --gas-adjustment 1.5 --gas auto --fees 150ubbn -y
This action should take effect within a few minutes.
Part 14: Bonus
You also have the option to join the Babylon Community on Zealy and take part in the various quests listed under #Babylonian, #Advanced, #Senior, and #Master categories → https://zealy.io/c/babylonchain/questboard
Hey everyone, I’m excited to share that I’ve partnered with Dotcom Canvas, a standout German brand known for its exquisite crypto-themed wall art. Their acrylic glass pieces are particularly impressive.
Discover their unique collection via my affiliate link. For a special treat, use the code CRYPTOTRIBE at checkout to get a 15% discount. To see these art pieces in their full glory, take a peek at this promotional video. It’s a great way to visualize how they could elevate your space.
Let’s enjoy some awesome crypto art together!
Disclosure: By using my affiliate link for purchases, I receive a commission.
About me
Hi! I’m ilaNihas, a big football fan (or soccer, if you prefer). After 13 years in IT, I paused my career to explore crypto, blockchain, and Web3. I’m fascinated by the potential and constantly searching for interesting projects, airdrops, and new nodes to explore. Join me as I combine my passions for sports, writing, and tech. Let’s dive into the world of crypto and blockchain together!
Thanks for reading! Please share your feedback in a comment and follow me on my socials if you enjoyed the article. I’ve also set up a Discord community where we can get together and have discussions about interesting crypto-related topics. You’re welcome to join us and be part of the conversation → https://discord.gg/zN4dH35JJZ
- Discord: ilaNihas
- Twitter: @ilaNihas21
- Medium: ilaNihas 🌍
Disclaimer
Please note that the content provided on this blog is intended solely for educational, informational, and entertainment purposes and should not be considered as financial advice. In summary, always do your own research, evaluate the information critically, and seek professional advice when necessary. Stay informed, exercise caution, and make well-informed decisions based on your own unique circumstances.