Deployment Scripts
Quick Start Script
One-click deployment script for Ubuntu VPS:
#!/bin/bash # Telebit Blockchain Quick Start Script # Run on Ubuntu 22.04 VPS set -e echo "===================================" echo "Telebit Blockchain Deployment" echo "===================================" # Update system sudo apt update && sudo apt upgrade -y # Install Docker sudo apt install -y docker.io docker-compose git jq curl sudo systemctl enable docker && sudo systemctl start docker sudo usermod -aG docker $USER # Clone repository (replace with your actual repo URL) git clone https://github.com/your-repo/telebit-chain.git cd telebit-chain # Build Docker image docker build -t telebitd:latest . # Initialize chain mkdir -p ~/.telebitd docker run --rm -v ~/.telebitd:/home/telebit/.telebitd telebitd:latest init telebit-validator --chain-id telebit_136919-1 # Create validator key docker run --rm -it -v ~/.telebitd:/home/telebit/.telebitd telebitd:latest keys add validator --keyring-backend test --algo eth_secp256k1 echo "===================================" echo "Telebit Blockchain Initialized!" echo "Run 'docker-compose up -d' to start" echo "==================================="
Docker Compose Configuration
Production-ready Docker Compose file:
version: '3.8'
services:
telebit-node:
image: telebitd:latest
container_name: telebit-node
restart: unless-stopped
ports:
- "26656:26656" # P2P
- "26657:26657" # Tendermint RPC
- "1317:1317" # REST API
- "8080:8080" # EVM JSON-RPC
- "8099:8099" # EVM WebSocket
- "9090:9090" # gRPC
volumes:
- ~/.telebitd:/home/telebit/.telebitd
command: >
start
--minimum-gas-prices=100000000000atbt
--json-rpc.api eth,txpool,personal,net,debug,web3
--api.enable
--api.enabled-unsafe-cors
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
volumes:
telebit-data:
Genesis Configuration Script
Script to configure genesis with Telebit parameters:
#!/bin/bash # Configure Telebit Genesis HOMEDIR="$HOME/.telebitd" GENESIS="$HOMEDIR/config/genesis.json" TMP_GENESIS="$HOMEDIR/config/tmp_genesis.json" # Total supply: 1.8 billion TBT = 1800000000 * 10^18 atbt TOTAL_SUPPLY="1800000000000000000000000000" # Update denominations jq '.app_state["staking"]["params"]["bond_denom"]="atbt"' "$GENESIS" > "$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["crisis"]["constant_fee"]["denom"]="atbt"' "$GENESIS" > "$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["gov"]["params"]["min_deposit"][0]["denom"]="atbt"' "$GENESIS" > "$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["evm"]["params"]["evm_denom"]="atbt"' "$GENESIS" > "$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["inflation"]["params"]["mint_denom"]="atbt"' "$GENESIS" > "$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" # Set EVM chain ID jq '.app_state["evm"]["params"]["chain_config"]["chain_id"]="136919"' "$GENESIS" > "$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" # Set gas limit jq '.consensus_params["block"]["max_gas"]="40000000"' "$GENESIS" > "$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" # Set base fee (0.0000001 TBT = 100000000000 atbt) jq '.app_state["feemarket"]["params"]["base_fee"]="100000000000"' "$GENESIS" > "$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" echo "Genesis configured successfully!"
Systemd Service File
For running without Docker (native installation):
[Unit]
Description=Telebit Blockchain Node
After=network-online.target
[Service]
User=telebit
ExecStart=/usr/local/bin/telebitd start \
--minimum-gas-prices=100000000000atbt \
--json-rpc.api eth,txpool,personal,net,debug,web3 \
--api.enable \
--home /home/telebit/.telebitd
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
Save as /etc/systemd/system/telebitd.service
Download Complete Package
The complete Telebit blockchain source code with all configurations is available in the
telebit-chain/ directory.
Package Contents:
- app/ - Application logic
- cmd/telebitd/ - CLI commands
- x/ - Custom modules
- Dockerfile - Container build
- init_telebit.sh - Initialization script
- go.mod - Go dependencies