This project contains the setup for running a Babylon Node within a Ubuntu Docker container. It includes the Dockerfile for building the image and the docker-compose.yml for easy setup and management. This project is based on the excellent article from BreizhNode.
- Docker
- Docker Compose
- A good internet connection for downloading dependencies
- Consequent amount of space on your hard drive / SSD (dozen of GB)
Clone this repository to your local machine to get started.
git clone https://github.com/Trustia-labs/babylone-node.git
cd babylone-node
Duplicate the .env.example
file and customize the NODE_NAME
env variable for your node name.
cp .env.example .env
nano .env
In the project directory, use Docker Compose to build and start the Babylon Node.
docker-compose up -d --build
This command builds the Docker image if it hasn't been built and starts the container in detached mode.
Check that the container is running successfully.
docker ps
You should see your babylon-node container listed.
After the container is up and running, you'll need to perform a few steps inside the container to finalize the setup.
Accessing the Container
Enter the container using the following command:
docker exec -it babylon-node /bin/bash
Before creating your wallet, ensure the node is fully synchronized with the network.
babylond status | jq '.sync_info.catching_up'
Wait until the catching_up value is false, indicating synchronization is complete.
Create a new wallet by running:
babylond keys add wallet
Follow the prompts to secure your wallet.
Link Wallet Replace with your wallet's address to link it.
babylond create-bls-key <WALLET_ADDRESS>
Adjust the timeout commit to 30s for better performance.
sed -i 's/^timeout_commit\s*=.*/timeout_commit = "30s"/' ~/.babylond/config/config.toml
Before registering your node, ensure you have at least 1 $BBN in your wallet. You can find some instructions here. Be patient, the faucet can take sometimes 3 to 6 hours to deliver when crowded.
- Check Wallet Balance : Visit Babylon Explorers and enter your wallet address to verify your balance. Alternatively, you can go directly to https://testnet.babylon.explorers.guru/account/<YOUR_ADDRESS>
- Create Validator Profile : Create your validator profile in .babylond/config/validator.json. Replace placeholders with your information.
cd .babylond/config
touch validator.json
nano validator.json
The content should be as follows (replace the placeholders):
{
"pubkey": "<PUBLIC_KEY>",
"amount": "1000000ubbn",
"moniker": "<NAME>",
"website": "<WEBSITE>",
"details": "<DESCRIPTION>",
"commission-rate": "0.10",
"commission-max-rate": "0.20",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
- The
PUBLIC_KEY
comes from your previously generated wallet - The moniker is your chosen nickname
Run the following command:
babylond tx checkpointing create-validator .babylond/config/validator.json --chain-id="bbn-test-3" --gas="auto" --gas-adjustment="1.5" --gas-prices="0.025ubbn" --from=wallet
- Monitoring: Access logs and monitor the node using Docker commands.
- Management: Perform routine node management tasks within the container environment.
- Support For more information, visit the Babylon official documentation or join the Babylon Discord community.
We're constantly working on improving Babylon Node Docker Setup and adding new features based on community feedback. Here's how you can stay connected and support our project:
- Star this Repository: If you find this project useful, please consider starring it by clicking the ⭐ button at the top. It helps more people discover our work!
- Follow https://github.com/orgs/Trustia-labs : For updates on this project and others, follow @Trustia-labs on GitHub.
Your support and contributions make this project better every day. Thank you for being a part of our community!