diff --git a/docs/guides/overview/babylon_genesis/baby_tokenomics.mdx b/docs/guides/overview/babylon_genesis/baby_tokenomics.mdx index ee12ffa5..b41e5f83 100644 --- a/docs/guides/overview/babylon_genesis/baby_tokenomics.mdx +++ b/docs/guides/overview/babylon_genesis/baby_tokenomics.mdx @@ -123,4 +123,15 @@ be staked. light: useBaseUrl('/img/guides/baby_token_unlocking_schedule.png'), dark: useBaseUrl('/img/guides/baby_token_unlocking_schedule_dark.png'), }} -/> \ No newline at end of file +/> + +## Legal Notice +**THIS IS NOT AN OFFER TO SELL OR THE SOLICITATION OF AN OFFER TO PURCHASE ANY BABY, AND IS NOT AN OFFERING, ADVERTISEMENT, SOLICITATION, CONFIRMATION, STATEMENT OR ANY FINANCIAL PROMOTION THAT CAN BE CONSTRUED AS AN INVITATION OR INDUCEMENT TO ENGAGE IN ANY INVESTMENT ACTIVITY OR SIMILAR.** + +YOU SHOULD NOT RELY ON THE CONTENT HEREIN FOR ADVICE OF ANY KIND, INCLUDING LEGAL, INVESTMENT, FINANCIAL, TAX, OR OTHER PROFESSIONAL ADVICE, AND SUCH CONTENT IS NOT A SUBSTITUTE FOR ADVICE FROM A QUALIFIED PROFESSIONAL. + +This page contains hypothetical, forward-looking, and projected figures, which are not guaranteed and are subject to change. Actual numbers may vary. Babylon Foundation and its affiliates make no representation or warranty, express or implied, as to the completeness, reliability, validity, or accuracy of this information. The content here may contain incorrect information and errors. You agree and acknowledge that any information contained herein is subject to change without notice. No advice or information, whether oral or written, obtained from Babylon Foundation, will be construed to create any warranty or representation. + +All information in this document is provided on an β€œas is” basis without any representation or warranty of any kind. + +The documents provided herein describe certain planned and specified economic fundamentals of a digital asset, BABY. These materials are intended for informational purposes only and are meant to outline the usage and functionalities of the asset within Babylon Genesis. It is important to understand that the primary purpose of BABY is to pay for fees, provide a mechanism for securing consensus, and allow for decentralized governance on Babylon Genesis; it is not intended to serve as an investment. \ No newline at end of file diff --git a/docs/guides/specifications/staking_transactions.mdx b/docs/guides/specifications/staking_transactions.mdx index 53d9cffc..56825890 100644 --- a/docs/guides/specifications/staking_transactions.mdx +++ b/docs/guides/specifications/staking_transactions.mdx @@ -8,7 +8,8 @@ sidebar_position: 1 import RemoteMD from '@site/src/components/RemoteMD'; -export const rawUrl="https://raw.githubusercontent.com/babylonlabs-io/babylon/refs/heads/release/v2.x/docs/transaction-impl-spec.md"; +export const rawUrl="https://raw.githubusercontent.com/babylonlabs-io/babylon/release/v2.3.x/docs/transaction-impl-spec.md"; + ⚠️ **Important**: This guide is for mainnet setup. Make sure you understand the risks and requirements before proceeding. + +--- + +## Before You Start + +### What You Need to Know + +**Babylon validators have special requirements:** +- Must participate in **BLS signature voting** every epoch +- Need both **consensus keys** and **BLS keys** +- Validator activation happens only at **epoch boundaries** + + +## Hardware & System Setup + +### Recommended Hardware +``` +CPU: 8 cores (minimum 4 cores) +RAM: 32GB (minimum 16GB) +Storage: 2TB SSD +Network: 1Gbps connection, minimal latency +``` + +### Initial System Setup + +**1. Update your system:** +```bash +sudo apt update && sudo apt upgrade -y +``` + +**2. Install essential tools:** +```bash +sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y +``` + +--- + +## πŸ”§ Installing Dependencies + +### Install Go Programming Language + +**1. Remove any existing Go installation:** +```bash +sudo rm -rf /usr/local/go +``` + +**2. Download and install Go 1.23.1:** +```bash +cd $HOME +VER="1.23.1" +wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz" +sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz" +rm "go$VER.linux-amd64.tar.gz" +``` + +**3. Set up Go environment:** +```bash +[ ! -f ~/.bash_profile ] && touch ~/.bash_profile +echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile +source $HOME/.bash_profile +[ ! -d ~/go/bin ] && mkdir -p ~/go/bin +``` + +**4. Verify installation:** +```bash +go version +# Should output: go version go1.23.1 linux/amd64 +``` + +--- + +## πŸ—οΈ Setting Up Babylon Node + +### Configure Environment Variables + +**1. Set up your node configuration:** +```bash +echo "export WALLET=\"wallet\"" >> $HOME/.bash_profile +echo "export MONIKER=\"your-validator-name\"" >> $HOME/.bash_profile # Change this! +echo "export BABYLON_CHAIN_ID=\"bbn-1\"" >> $HOME/.bash_profile +echo "export BABYLON_PORT=\"27\"" >> $HOME/.bash_profile +source $HOME/.bash_profile +``` + +### Download and Build Babylon + +**1. Clone the repository:** +```bash +cd $HOME +rm -rf babylon +git clone https://github.com/babylonlabs-io/babylon.git +cd babylon +``` + +**2. Checkout the mainnet version:** +```bash +git checkout v2.1.0 +``` + +**3. Build for mainnet:** +```bash +BABYLON_BUILD_OPTIONS="mainnet" make install +``` + +**4. Verify installation:** +```bash +babylond version +``` + +### Initialize Your Node + +**1. Initialize the node:** +```bash +babylond init $MONIKER --chain-id $BABYLON_CHAIN_ID +``` + +**2. Configure client settings:** +```bash +sed -i \ +-e "s/chain-id = .*/chain-id = \"${BABYLON_CHAIN_ID}\"/" \ +-e "s/keyring-backend = .*/keyring-backend = \"os\"/" \ +-e "s/node = .*/node = \"tcp:\/\/localhost:${BABYLON_PORT}657\"/" $HOME/.babylond/config/client.toml +``` + +### Download Network Configuration + +**1. Download genesis file:** +```bash +wget -O $HOME/.babylond/config/genesis.json https://server-2.itrocket.net/mainnet/babylon/genesis.json +``` + +**2. Download address book:** +```bash +wget -O $HOME/.babylond/config/addrbook.json https://server-2.itrocket.net/mainnet/babylon/addrbook.json +``` + +### Configure Network Settings + +**1. Set seeds and peers:** +```bash +SEEDS="145ee7d64ae5d3f6a8ceb6b7dba889f7de48de06@babylon-mainnet-seed.itrocket.net:27656" +PEERS="b16397b576f2431c8a80efa4f5338c1b82583916@babylon-mainnet-peer.itrocket.net:27656" + +sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \ +-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.babylond/config/config.toml +``` + +### Configure Ports and Performance + +**1. Set custom ports in app.toml:** +```bash +sed -i.bak -e "s%:1317%:${BABYLON_PORT}317%g; +s%:8080%:${BABYLON_PORT}080%g; +s%:9090%:${BABYLON_PORT}090%g; +s%:9091%:${BABYLON_PORT}091%g; +s%:8545%:${BABYLON_PORT}545%g; +s%:8546%:${BABYLON_PORT}546%g; +s%:6065%:${BABYLON_PORT}065%g" $HOME/.babylond/config/app.toml +``` + +**2. Set custom ports in config.toml:** +```bash +sed -i.bak -e "s%:26658%:${BABYLON_PORT}658%g; +s%:26657%:${BABYLON_PORT}657%g; +s%:6060%:${BABYLON_PORT}060%g; +s%:26656%:${BABYLON_PORT}656%g; +s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${BABYLON_PORT}656\"%; +s%:26660%:${BABYLON_PORT}660%g" $HOME/.babylond/config/config.toml +``` + +**3. Configure pruning and gas settings:** +```bash +# Set pruning +sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.babylond/config/app.toml +sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.babylond/config/app.toml +sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.babylond/config/app.toml + +# Set minimum gas prices and enable monitoring +sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.002ubbn"|g' $HOME/.babylond/config/app.toml +sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.babylond/config/config.toml +sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.babylond/config/config.toml +``` + +--- + +## Creating Your Validator Keys + +### Create System Service + +**1. Create the service file:** +```bash +sudo tee /etc/systemd/system/babylond.service > /dev/null < πŸ” **CRITICAL**: Save your mnemonic phrase securely! You cannot recover your validator without it. + +**2. Or restore an existing wallet:** +```bash +babylond keys add $WALLET --recover +``` + +**3. Save wallet addresses:** +```bash +WALLET_ADDRESS=$(babylond keys show $WALLET -a) +VALOPER_ADDRESS=$(babylond keys show $WALLET --bech val -a) +echo "export WALLET_ADDRESS=\"$WALLET_ADDRESS\"" >> $HOME/.bash_profile +echo "export VALOPER_ADDRESS=\"$VALOPER_ADDRESS\"" >> $HOME/.bash_profile +source $HOME/.bash_profile + +echo "πŸ’° Wallet Address: $WALLET_ADDRESS" +echo "πŸ”‘ Validator Operator Address: $VALOPER_ADDRESS" +``` + +--- + +## Syncing Your Node + +### Download Snapshot (Recommended) + +**1. Reset and download snapshot:** +```bash +babylond tendermint unsafe-reset-all --home $HOME/.babylond + +# Download snapshot if available +if curl -s --head https://server-2.itrocket.net/mainnet/babylon/null | head -n 1 | grep "200" > /dev/null; then + echo "πŸ“₯ Downloading snapshot..." + curl https://server-2.itrocket.net/mainnet/babylon/null | lz4 -dc - | tar -xf - -C $HOME/.babylond + echo "βœ… Snapshot downloaded successfully" +else + echo "⚠️ No snapshot found - will sync from genesis" +fi +``` + +### Start Your Node + +**1. Start the node:** +```bash +sudo systemctl restart babylond +``` + +**2. Monitor logs:** +```bash +sudo journalctl -u babylond -fo cat +``` + +**3. Check sync status:** +```bash +# This should show 'false' when fully synced +babylond status 2>&1 | jq .SyncInfo.catching_up +``` + +### Monitor Sync Progress + +**Create a sync monitoring script:** +```bash +cat > check_sync.sh << 'EOF' +#!/bin/bash +rpc_port=$(grep -m 1 -oP '^laddr = "\K[^"]+' "$HOME/.babylond/config/config.toml" | cut -d ':' -f 3) +while true; do + local_height=$(curl -s localhost:$rpc_port/status | jq -r '.result.sync_info.latest_block_height') + network_height=$(curl -s https://babylon-mainnet-rpc.itrocket.net/status | jq -r '.result.sync_info.latest_block_height') + + if ! [[ "$local_height" =~ ^[0-9]+$ ]] || ! [[ "$network_height" =~ ^[0-9]+$ ]]; then + echo -e "\033[1;31mError: Invalid block height data. Retrying...\033[0m" + sleep 5 + continue + fi + + blocks_left=$((network_height - local_height)) + echo -e "\033[1;33mNode Height:\033[1;34m $local_height\033[0m \033[1;33m| Network Height:\033[1;36m $network_height\033[0m \033[1;33m| Blocks Left:\033[1;31m $blocks_left\033[0m" + + if [ $blocks_left -eq 0 ]; then + echo "πŸŽ‰ Node is fully synced!" + break + fi + + sleep 5 +done +EOF + +chmod +x check_sync.sh +./check_sync.sh +``` + +--- + +## Setting Up BLS Keys + +> **Why BLS Keys?** Babylon validators must sign checkpoints using BLS signatures every epoch to secure the network. + +### Generate BLS Keys + +**1. Create BLS keys for your wallet:** +```bash +babylond create-bls-key $WALLET_ADDRESS +``` + +**2. Create BLS password file:** +```bash +echo "your_secure_bls_password_here" > $HOME/.babylond/config/bls_password.txt +chmod 600 $HOME/.babylond/config/bls_password.txt +``` + +> πŸ”’ **Security**: Use a strong, unique password for BLS keys + +**3. Configure BLS key name:** +```bash +sed -i -e "s|^key-name *=.*|key-name = \"$WALLET\"|" $HOME/.babylond/config/app.toml +``` + +**4. Restart node to load BLS keys:** +```bash +sudo systemctl restart babylond +``` + +--- + +## Creating Your Validator + +### Wait for Full Sync + +**Before creating your validator, ensure:** +- [ ] Node is fully synced (`catching_up: false`) +- [ ] You have enough tokens to cover both the stake amount and transaction fees. +- [ ] BLS keys are properly configured + +**Check your balance:** +```bash +babylond query bank balances $WALLET_ADDRESS +``` + +### Create Validator Transaction + +**1. Create validator configuration file:** +```bash +cd $HOME +cat > validator.json << EOF +{ + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "$(babylond comet show-validator | grep -Po '"key":\s*"\K[^"]*')" + }, + "amount": "1000000ubbn", + "moniker": "$MONIKER", + "identity": "", + "website": "", + "security": "", + "details": "Professional Babylon validator", + "commission-rate": "0.05", + "commission-max-rate": "0.20", + "commission-max-change-rate": "0.01", + "min-self-delegation": "1" +} +EOF +``` + +**2. Customize your validator details:** +```bash +# Edit the validator.json file with your information +nano validator.json +``` + +**Important fields to customize:** +- `moniker`: Your validator name +- `identity`: Your Keybase ID (optional) +- `website`: Your website/social media +- `details`: Description of your validator +- `commission-rate`: Your commission (5% = 0.05) + +**3. Create your validator:** +```bash +babylond tx staking create-validator validator.json \ + --from $WALLET \ + --chain-id bbn-1 \ + --gas auto \ + --gas-adjustment 1.5 +``` + +### Verify Validator Creation + +**After submitting the transaction:** + +1. Save your transaction hash and check it in explorer + +2. Wait for next epoch (~60 minutes) for activation + +3. Check validator status: +```bash +babylond query staking validator $VALOPER_ADDRESS +``` + +4. Check if validator is in active set: +```bash +babylond query staking validators --limit 200 | grep -A 5 -B 5 $MONIKER +``` + +--- + +## Security & Monitoring + +### Essential Security Steps + +**1. Backup critical files:** +```bash +# Create backup directory +mkdir -p $HOME/validator_backup + +# Backup critical files +cp $HOME/.babylond/config/priv_validator_key.json $HOME/validator_backup/ +cp $HOME/.babylond/config/bls_password.txt $HOME/validator_backup/ +cp $HOME/.babylond/config/node_key.json $HOME/validator_backup/ + +# Backup your wallet mnemonic (write it down separately!) +``` + +**2. Set up firewall:** +```bash +sudo ufw default allow outgoing +sudo ufw default deny incoming +sudo ufw allow ssh/tcp +sudo ufw allow ${BABYLON_PORT}656/tcp +sudo ufw enable +``` + +**3. Secure SSH access:** +```bash +# Edit SSH config +sudo nano /etc/ssh/sshd_config + +# Add these lines: +# PermitRootLogin no +# PasswordAuthentication no +# PubkeyAuthentication yes + +# Restart SSH +sudo systemctl restart sshd +``` + +### Monitoring Commands + +**Check node status:** +```bash +babylond status 2>&1 | jq +``` + +**Check validator info:** +```bash +babylond query staking validator $VALOPER_ADDRESS +``` + +**Monitor logs:** +```bash +sudo journalctl -u babylond -fo cat +``` + +**Check if validator is jailed:** +```bash +babylond query slashing signing-info $(babylond tendermint show-validator) +``` + +**Withdraw rewards:** +```bash +babylond tx distribution withdraw-rewards $VALOPER_ADDRESS \ + --from $WALLET \ + --commission \ + --chain-id bbn-1 \ + --gas auto \ + --gas-adjustment 1.5 +``` + +--- + +## πŸ”§ Troubleshooting + +### Common Issues & Solutions + +**❌ Node not syncing:** +```bash +# Check peers +babylond query staking validators --limit 1 --output json | jq + +# Restart with snapshot +sudo systemctl stop babylond +babylond tendermint unsafe-reset-all --home $HOME/.babylond +# Re-download snapshot and restart +``` + +**❌ BLS signature errors:** +```bash +# Check BLS configuration +grep -n "key-name" $HOME/.babylond/config/app.toml +cat $HOME/.babylond/config/bls_password.txt + +# Regenerate BLS keys if needed +babylond create-bls-key $WALLET_ADDRESS +sudo systemctl restart babylond +``` + +**❌ Validator not active:** +- Wait for next epoch (up to 60 minutes) +- Ensure you have enough stake to be in top validators +- Check your validator hasn't been jailed + +**❌ Transaction failures:** +```bash +# Check balance +babylond query bank balances $WALLET_ADDRESS + +# Check gas prices +sed -n 's/^minimum-gas-prices = "\(.*\)"/\1/p' $HOME/.babylond/config/app.toml +``` + +### Useful Commands + +**Unjail validator:** +```bash +babylond tx slashing unjail \ + --from $WALLET \ + --chain-id bbn-1 \ + --gas auto \ + --gas-adjustment 1.5 +``` + +**Edit validator details:** +```bash +babylond tx staking edit-validator \ + --new-moniker "New Name" \ + --identity "new-keybase-id" \ + --website "https://newwebsite.com" \ + --details "Updated description" \ + --from $WALLET \ + --chain-id bbn-1 \ + --gas auto \ + --gas-adjustment 1.5 +``` + +**Self-delegate more tokens:** +```bash +babylond tx staking delegate $VALOPER_ADDRESS 1000000ubbn \ + --from $WALLET \ + --chain-id bbn-1 \ + --gas auto \ + --gas-adjustment 1.5 +``` + +--- + +## Final Checklist + +Before considering your validator fully operational: + +- Node is fully synced and running +- Validator transaction confirmed +- BLS keys properly configured +- Firewall configured +- Critical files backed up +- Monitoring is setup +- Validator appears in explorer +- Validator is signing blocks + +**πŸŽ‰ Congratulations! You're now running a Babylon validator!** + + +### Important Links +- **Official Documentation**: https://docs.babylonlabs.io/ +- **GitHub Repository**: https://github.com/babylonlabs-io/babylon +- **Block Explorer**: https://babylon.explorers.guru/ +- **Mainnet Info**: https://github.com/babylonlabs-io/networks/tree/main/bbn-1 diff --git a/docs/operators/finality_providers/finality_provider_simple_guide.mdx b/docs/operators/finality_providers/finality_provider_simple_guide.mdx new file mode 100644 index 00000000..a96f3043 --- /dev/null +++ b/docs/operators/finality_providers/finality_provider_simple_guide.mdx @@ -0,0 +1,340 @@ +--- +sidebar_class_name: finality_provider_simple_guide_sidebar +sidebar_label: Finality Provider Simple Guide +sidebar_position: 3 +--- + +# Finality Provider Simple Guide + +## Prerequisites +### Environment Setup + - Server Configuration: 2 CPU Cores / 4GB RAM / 50GB SSD + - OS: Ubuntu 20.04+ or macOS + - Install Golang 1.23+: +```bash +wget https://go.dev/dl/go1.23.0.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.23.0.linux-amd64.tar.gz +echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc +source ~/.bashrc +``` + - Verify Installation: go version + +### Get Test Tokens + - Register a Babylon testnet account + - Obtain test tokens from the Faucet (address format: bbn1...) +### Step 1: Install Finality Provider Tools +```bash +# Clone the repository and compile +git clone https://github.com/babylonlabs-io/finality-provider.git +cd finality-provider +make install + + +# Verify installation +fpd version +eotsd version +``` +### Step 2: Create EOTS Key (Signing Key) +```bash +# Create EOTS key (for test environment) +eotsd keys add eots-key-1 --keyring-backend test + +# Record the pubkey_hex from the output (needed for later steps) +# Example output: +# pubkey_hex: 36227dc*****************************56b8a6fd +``` +### Step 3: Start EOTS Service +```bash +# Start EOTS daemon (run in background) +eotsd start --home ~/.eotsd & + +# Verify service status (check logs) +tail -f ~/.eotsd/logs/eotsd.log + +# Should see "EOTS Manager Daemon is fully active!" +``` +### Step 4: Create Finality Provider Key +```bash +# Create Finality Provider key +fpd keys add fp-key-1 --keyring-backend test + +# Record the address from the output (needed for later steps) +# Example output: +# address: bbn1***************************wn3upt +``` +### Step 5: Configure and Start Finality Provider +Edit the configuration file (~/.fpd/config/fpd.conf): +```toml +[Application Options] +```text +EOTSManagerAddress = "127.0.0.1:12582" # EOTS service address +RPCListener = "127.0.0.1:12581" # FPD service address +[babylon] +Key = "fp-key-1" # Key name from Step 4 +ChainID = "bbn-test-5" # Testnet chain ID +RPCAddr = "https://babylon-testnet-rpc.nodes.guru" # Public RPC node +KeyDirectory = "~/.fpd" # Key directory +``` + +#### Start Finality Provider: +```bash +fpd start --home ~/.fpd & + +Verify service status +tail -f ~/.fpd/logs/fpd.log + +# Should see "Starting finality provider daemon..." +``` +### Step 6: Register Finality Provider +```bash +# Execute registration command (replace parameters) +fpd create-finality-provider \ +--chain-id bbn-test-5 \ +--eots-pk \ +--commission-rate 0.05 \ +--commission-max-rate 0.05 \ +--commission-max-change-rate 0.01 \ +--key-name fp-key-1 \ +--moniker "YourFinalityProvider" \ +--website "https://yourwebsite.com" \ +--security-contact "your@email.com" \ +--details "Finality provider for Babylon network" + +# Successful output example: +# "status": "REGISTERED" +# "tx_hash": "F2DD0C***************************C9F7DEA6" +``` +### Step 7: Verify Successful Deployment +#### Check status: +```bash +fpd finality-provider-info + +# Should show "status": "ACTIVE" +``` +#### View rewards: +```bash +fpd reward-gauges
--node https://babylon-testnet-rpc.nodes.guru +``` +#### Monitoring metrics (optional): + - Finality Provider metrics: http://localhost:2112/metrics + - EOTS metrics: http://localhost:2113/metrics +### Common Issues + - Error: account not found +Cause: The account from Step 4 has insufficient test tokens + +Solution: Obtain more test tokens from the Faucet + - Service fails to start +Check logs: `tail -f ~/.eotsd/logs/eotsd.log or tail -f ~/.fpd/logs/fpd.log` + +Ensure ports are not occupied (default EOTS: 12582, FPD: 12581) +### Next Steps + - Set up automatic service restart (Systemd configuration) + - Configure firewall to open necessary ports + - Regularly monitor service status and rewards + +Congratulations! You have successfully deployed a Finality Provider! πŸŽ‰ + +## Docker Deployment Guide +If you prefer a containerized deployment using Docker, follow these steps. This method simplifies dependency management and ensures consistent environments. + +### Prerequisites +#### Environment Setup + - Server Configuration: 2 CPU Cores / 4GB RAM / 50GB SSD + - OS: Docker-supported Linux (Ubuntu 20.04+ recommended) + - Docker and Docker Compose installed: + +```bash +# Install Docker +curl -fsSL https://get.docker.com -o get-docker.sh +sudo sh get-docker.sh + +# Verify installation +docker --version +``` +### Step 1: Pull the Docker Image +```bash +# Pull the official image +docker pull babylonlabs/finality-provider:latest +``` +### Step 2: Create Project Directory Structure +```bash +# Create project directory +mkdir babylon-fp-docker && cd babylon-fp-docker + +# Create necessary directories +mkdir -p {data/{eotsd,fpd},config,logs} +``` +### Step 3: Initialize Configuration Files +Use the `init` command to auto-generate default config files (more reliable than manual creation): +#### Initialize EOTS Manager Configuration +```bash +# Initialize EOTS config (auto-generates eotsd.conf) +docker run --rm -v $(pwd)/data/eotsd:/home/finality-provider/.eotsd \ +babylonlabs/finality-provider:latest \ +eotsd init --home /home/finality-provider/.eotsd --force +``` +#### Initialize Finality Provider Configuration +```bash +# Initialize Finality Provider config (auto-generates fpd.conf) +docker run --rm -v $(pwd)/data/fpd:/home/finality-provider/.fpd \ + babylonlabs/finality-provider:latest \ + fpd init --home /home/finality-provider/.fpd --force +``` +### Step 4: Create Keys +#### Create EOTS Key +```bash +docker run --rm -it -v $(pwd)/data/eotsd:/home/finality-provider/.eotsd \ + babylonlabs/finality-provider:latest \ + eotsd keys add eots-key-1 --keyring-backend test --home /home/finality-provider/.eotsd + +# Record the pubkey_hex from the output (required for later steps) +# Example output: +# pubkey_hex: fbe6ce8bb6*****************************119e65aa4e3 +``` +#### Create Finality Provider Key +```bash +docker run --rm -it -v $(pwd)/data/fpd:/home/finality-provider/.fpd \ + babylonlabs/finality-provider:latest \ + fpd keys add fp-key-1 --keyring-backend test --home /home/finality-provider/.fpd + +# Record the address from the output (required for later steps) +# Example output: +# address: bbn1***************************gqj9 +``` +#### Step 5: Create Docker Compose Configuration +Create a `docker-compose.yml` file in the project root: +```yaml +version: '3.8' + +services: + eotsd: + image: babylonlabs/finality-provider:latest + container_name: eots-manager + command: ["eotsd", "start", "--home", "/home/finality-provider/.eotsd"] + ports: + - "12582:12582" # EOTS RPC port + - "2113:2113" # EOTS metrics port + volumes: + - ./data/eotsd:/home/finality-provider/.eotsd + networks: + - fp-network + restart: unless-stopped + + fpd: + image: babylonlabs/finality-provider:latest + container_name: finality-provider + command: ["fpd", "start", "--home", "/home/finality-provider/.fpd"] + ports: + - "12581:12581" # FPD RPC port + - "2112:2112" # FPD metrics port + volumes: + - ./data/fpd:/home/finality-provider/.fpd + networks: + - fp-network + depends_on: + - eotsd + restart: unless-stopped + +networks: + fp-network: + driver: bridge +``` +### Step 6: Modify Configuration Files +#### Edit EOTS Manager Configuration +```bash +# Edit EOTS config file +nano data/eotsd/config/eotsd.conf +``` +Update these parameters: +```toml +[Application Options] +RPCListener = 0.0.0.0:12582 # Allow inter-container communication +KeyringBackend = test +``` +#### Edit Finality Provider Configuration +```bash +# Edit FP config file +nano data/fpd/config/fpd.conf +``` +Update these parameters: +```toml +[Application Options] +EOTSManagerAddress = eots-manager:12582 # Docker Compose service name +RPCListener = 0.0.0.0:12581 + +[babylon] +Key = fp-key-1 +ChainID = bbn-test-5 +RPCAddr = https://babylon-testnet-rpc.nodes.guru +KeyringBackend = test +``` +### Step 7: Start Services +```bash +# Start all services +docker-compose up -d + +# Check service status +docker-compose ps + +# View logs +docker-compose logs -f +``` +### Step 8: Register Finality Provider +Run the following command to register (replace `` with the `pubkey_hex` recorded in Step 4): +```bash +docker exec -it finality-provider fpd create-finality-provider \ + --chain-id bbn-test-5 \ + --eots-pk \ + --commission-rate 0.05 \ + --commission-max-rate 0.05 \ + --commission-max-change-rate 0.01 \ + --key-name fp-key-1 \ + --moniker "DockerFinalityProvider" \ + --website "https://yourwebsite.com" \ + --security-contact "your@email.com" \ + --details "Docker-based finality provider for Babylon network" \ + --daemon-address localhost:12581 +``` +### Step 9: Verify Docker Deployment +```bash +# Check Finality Provider status +docker exec -it finality-provider \ + fpd finality-provider-info + +# Should show "status": "ACTIVE" + +# View rewards +docker exec -it finality-provider \ + fpd reward-gauges
\ + --node https://babylon-testnet-rpc.nodes.guru +``` + +### Docker-Specific Common Issues + - "account `
` not found: key not found" + + If you encounter an error like `account bbn1*******************qj9 not found: key not found`, this typically means: + 1. The Finality Provider account (created in Step 4) has no test tokens (tbaby) to pay for transaction fees. + 2. The account hasn’t been initialized on the network yet (requires a small balance to activate). + - Solution: Fund the Account with Test Tokens + 1. Get your Finality Provider address (recorded in Step 4, e.g., `bbn1*******************qj9`). + 2. Request test tokens (tbaby) from the Babylon testnet faucet: + - Visit the [Xangle Faucet](https://babylon-explorer.xangle.io/testnet/faucet). + - Enter your address and submit the request. + 3. Verify the balance (replace `` with your account address): + ```bash + # For local deployment: + fpd query bank balances --node https://babylon-testnet-rpc.nodes.guru + + # For Docker deployment: + docker exec -it finality-provider \ + fpd query bank balances \ + --node https://babylon-testnet-rpc.nodes.guru + ``` + 4. Retry the registration command after confirming the balance is received. +This error is resolved once the account has sufficient tbaby to cover transaction fees (typically a small amount, e.g., 1-10 tbaby). +### Docker Deployment Next Steps + - Set up systemd to manage the Docker Compose stack for auto-restart on server reboot. + - Configure firewall rules to restrict access to RPC ports. + - Regularly update the Docker image with docker pull babylonlabs/finality-provider:latest and restart services. + +Congratulations! You’ve deployed a Finality Provider using Docker! πŸŽ‰ \ No newline at end of file diff --git a/src/components/RemoteMD.jsx b/src/components/RemoteMD.jsx index 1fcb6c6d..6734e3ca 100644 --- a/src/components/RemoteMD.jsx +++ b/src/components/RemoteMD.jsx @@ -129,14 +129,23 @@ export default function RemoteMD({ url, isCustom: true })), - ...stableReleases.map(release => ({ - key: release.tag_name, - label: release.tag_name, - url: rawUrl.replace(/refs\/heads\/[^/]+/, release.tag_name), - publishedAt: release.published_at - })) + ...stableReleases.map(release => { + let url; + if (rawUrl.includes('release/')) { + url = rawUrl.replace(/release\/v[\d.]+\w*/, `${release.tag_name}`); + } else { + url = rawUrl.replace(/refs\/heads\/[^/]+/, release.tag_name) + } + return { + key: release.tag_name, + label: release.tag_name, + url, + publishedAt: release.published_at + } + }) ]; + const customReleases = allReleases.filter(r => r.isCustom); const apiReleases = allReleases.filter(r => !r.isCustom).sort(sortBySemVer); const sortedReleases = [...customReleases, ...apiReleases]; diff --git a/static/img/guides/btc_stakers/web_staking/1.png b/static/img/guides/btc_stakers/web_staking/1.png index b14ab8ac..1377e203 100644 Binary files a/static/img/guides/btc_stakers/web_staking/1.png and b/static/img/guides/btc_stakers/web_staking/1.png differ diff --git a/static/img/guides/btc_stakers/web_staking/1_dark.png b/static/img/guides/btc_stakers/web_staking/1_dark.png index 93a05aeb..00d7a84c 100644 Binary files a/static/img/guides/btc_stakers/web_staking/1_dark.png and b/static/img/guides/btc_stakers/web_staking/1_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/2.png b/static/img/guides/btc_stakers/web_staking/2.png index 5745990f..38c65706 100644 Binary files a/static/img/guides/btc_stakers/web_staking/2.png and b/static/img/guides/btc_stakers/web_staking/2.png differ diff --git a/static/img/guides/btc_stakers/web_staking/2_dark.png b/static/img/guides/btc_stakers/web_staking/2_dark.png index d0557318..f4bd57ec 100644 Binary files a/static/img/guides/btc_stakers/web_staking/2_dark.png and b/static/img/guides/btc_stakers/web_staking/2_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/3.png b/static/img/guides/btc_stakers/web_staking/3.png index c10dedbf..769740f6 100644 Binary files a/static/img/guides/btc_stakers/web_staking/3.png and b/static/img/guides/btc_stakers/web_staking/3.png differ diff --git a/static/img/guides/btc_stakers/web_staking/3_dark.png b/static/img/guides/btc_stakers/web_staking/3_dark.png index 7271252d..7675b646 100644 Binary files a/static/img/guides/btc_stakers/web_staking/3_dark.png and b/static/img/guides/btc_stakers/web_staking/3_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/4.png b/static/img/guides/btc_stakers/web_staking/4.png index f4b1b9fd..417be26c 100644 Binary files a/static/img/guides/btc_stakers/web_staking/4.png and b/static/img/guides/btc_stakers/web_staking/4.png differ diff --git a/static/img/guides/btc_stakers/web_staking/4_dark.png b/static/img/guides/btc_stakers/web_staking/4_dark.png index 7a3ae6bf..943dd947 100644 Binary files a/static/img/guides/btc_stakers/web_staking/4_dark.png and b/static/img/guides/btc_stakers/web_staking/4_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/5.png b/static/img/guides/btc_stakers/web_staking/5.png index c11f7394..dca80bae 100644 Binary files a/static/img/guides/btc_stakers/web_staking/5.png and b/static/img/guides/btc_stakers/web_staking/5.png differ diff --git a/static/img/guides/btc_stakers/web_staking/5_dark.png b/static/img/guides/btc_stakers/web_staking/5_dark.png index 10531b57..46dfd3d5 100644 Binary files a/static/img/guides/btc_stakers/web_staking/5_dark.png and b/static/img/guides/btc_stakers/web_staking/5_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/6.png b/static/img/guides/btc_stakers/web_staking/6.png index 940de242..d68986b3 100644 Binary files a/static/img/guides/btc_stakers/web_staking/6.png and b/static/img/guides/btc_stakers/web_staking/6.png differ diff --git a/static/img/guides/btc_stakers/web_staking/6_dark.png b/static/img/guides/btc_stakers/web_staking/6_dark.png index d2444f03..4ef52490 100644 Binary files a/static/img/guides/btc_stakers/web_staking/6_dark.png and b/static/img/guides/btc_stakers/web_staking/6_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/7.png b/static/img/guides/btc_stakers/web_staking/7.png index cd744842..6638264a 100644 Binary files a/static/img/guides/btc_stakers/web_staking/7.png and b/static/img/guides/btc_stakers/web_staking/7.png differ diff --git a/static/img/guides/btc_stakers/web_staking/7_dark.png b/static/img/guides/btc_stakers/web_staking/7_dark.png index d25f2d98..3e671214 100644 Binary files a/static/img/guides/btc_stakers/web_staking/7_dark.png and b/static/img/guides/btc_stakers/web_staking/7_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/8.png b/static/img/guides/btc_stakers/web_staking/8.png index 52b154a8..9e81c227 100644 Binary files a/static/img/guides/btc_stakers/web_staking/8.png and b/static/img/guides/btc_stakers/web_staking/8.png differ diff --git a/static/img/guides/btc_stakers/web_staking/8_dark.png b/static/img/guides/btc_stakers/web_staking/8_dark.png index 2611bfaa..00d25c1c 100644 Binary files a/static/img/guides/btc_stakers/web_staking/8_dark.png and b/static/img/guides/btc_stakers/web_staking/8_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/9.png b/static/img/guides/btc_stakers/web_staking/9.png index 64c07c7a..0a95271b 100644 Binary files a/static/img/guides/btc_stakers/web_staking/9.png and b/static/img/guides/btc_stakers/web_staking/9.png differ diff --git a/static/img/guides/btc_stakers/web_staking/9_dark.png b/static/img/guides/btc_stakers/web_staking/9_dark.png index 00502223..ff59cdb1 100644 Binary files a/static/img/guides/btc_stakers/web_staking/9_dark.png and b/static/img/guides/btc_stakers/web_staking/9_dark.png differ diff --git a/static/img/guides/btc_stakers/web_staking/web_app.png b/static/img/guides/btc_stakers/web_staking/web_app.png index 931c5360..3b255ebb 100644 Binary files a/static/img/guides/btc_stakers/web_staking/web_app.png and b/static/img/guides/btc_stakers/web_staking/web_app.png differ diff --git a/static/img/guides/btc_stakers/web_staking/web_app_dark.png b/static/img/guides/btc_stakers/web_staking/web_app_dark.png index a207ab53..8ac0f259 100644 Binary files a/static/img/guides/btc_stakers/web_staking/web_app_dark.png and b/static/img/guides/btc_stakers/web_staking/web_app_dark.png differ