Files
aitbc/examples/env.example
aitbc 9215684722
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 2s
Cross-Node Transaction Testing / transaction-test (push) Successful in 9s
Deploy to Testnet / deploy-testnet (push) Successful in 1m12s
Integration Tests / test-service-integration (push) Successful in 2m38s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 4s
Multi-Node Stress Testing / stress-test (push) Successful in 2s
Node Failover Simulation / failover-test (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Security Scanning / security-scan (push) Successful in 31s
Add default_peer_rpc_url to blockchain node configuration and refactor env setup scripts
- Add default_peer_rpc_url=http://127.0.0.1:8006 to blockchain-node .env.example and examples/env.example
- Extract set_env() helper function in setup.sh to handle env key-value updates (add if missing, update if exists)
- Ensure gossip_backend, gossip_broadcast_url, and default_peer_rpc_url are set in setup.sh node identity initialization
- Replace all sed -i commands with set_env() calls in workflow scripts
2026-05-02 15:35:34 +02:00

138 lines
3.6 KiB
Plaintext

# AITBC Global Environment Configuration Template
# Copy this file to /etc/aitbc/.env and customize for your deployment
# This file contains global configuration shared across all nodes in the island
# =========================
# Core Environment
# =========================
NODE_ENV=production
APP_ENV=production
DEBUG=false
LOG_LEVEL=INFO
# =========================
# Training Configuration
# =========================
TRAINING_MODE=true
TRAINING_STAGE=stage1_foundation
CLI_PATH=/opt/aitbc/aitbc-cli
LOG_DIR=/var/log/aitbc
WALLET_NAME=openclaw-trainee
WALLET_PASSWORD=trainee123
# =========================
# Service Ports (for training library)
# =========================
EXCHANGE_PORT=8000
COORDINATOR_PORT=8001
GENESIS_NODE_PORT=8006
FOLLOWER_NODE_PORT=8007
OLLAMA_PORT=11434
# =========================
# Blockchain Core
# =========================
chain_id=ait-testnet
supported_chains=ait-testnet,ait-devnet
db_path=/var/lib/aitbc/data/chain.db
rpc_bind_host=0.0.0.0
rpc_bind_port=8006
p2p_bind_host=0.0.0.0
p2p_bind_port=7070
# =========================
# Security
# =========================
SECRET_KEY=production-secret-key-change-me-in-production
JWT_SECRET=production-jwt-secret-32-chars-long
BLOCKCHAIN_API_KEY=production-api-key-change-me
COORDINATOR_API_KEY=admin_prod_key_use_real_value
CLIENT_API_KEYS=["client_prod_key_use_real_value"]
MINER_API_KEYS=["miner_prod_key_use_real_value"]
ADMIN_API_KEYS=["admin_prod_key_use_real_value"]
HMAC_SECRET=change_this_to_a_32_byte_random_secret
# =========================
# Database
# =========================
DATABASE_URL=postgresql://aitbc:secure_password@localhost:5432/aitbc_prod
REDIS_URL=redis://localhost:6379/0
# =========================
# Monitoring
# =========================
PROMETHEUS_PORT=9090
GRAFANA_PORT=3000
MONITORING_PORT=9000
# =========================
# Paths
# =========================
BLOCKCHAIN_DATA_DIR=/var/lib/aitbc/data
BLOCKCHAIN_CONFIG_DIR=/etc/aitbc
BLOCKCHAIN_LOG_DIR=/var/log/aitbc/production
keystore_path=/var/lib/aitbc/keystore
keystore_password_file=/var/lib/aitbc/keystore/.password
# =========================
# Block Production
# =========================
enable_block_production=true
block_time_seconds=30
proposer_id=ait1ytkh0cn8v2a4zjwzyav6854832myf9j7unsse8yntmuwzst4qhtqe9hqdw
# Only propose blocks if mempool is not empty
propose_only_if_mempool_not_empty=true
# =========================
# Network Configuration
# =========================
NETWORK_ID=1337
CHAIN_ID=ait-testnet
CONSENSUS=proof_of_authority
gossip_backend=broadcast
gossip_broadcast_url=redis://localhost:6379
default_peer_rpc_url=http://127.0.0.1:8006
# =========================
# NAT Traversal (STUN/TURN)
# =========================
STUN_SERVERS=stun.l.google.com:19302,jitsi.bubuit.net:3478
TURN_SERVER=jitsi.bubuit.net:3478
# TURN_USERNAME and TURN_PASSWORD need to be configured if using TURN relay
# =========================
# Island Configuration (Federated Mesh)
# =========================
ISLAND_ID=test-island-001
ISLAND_NAME="Test Island"
IS_HUB=true
ISLAND_CHAIN_ID=ait-testnet
HUB_DISCOVERY_URL=aitbc
BRIDGE_ISLANDS=
# =========================
# API Configuration
# =========================
API_VERSION=v1
API_PREFIX=/api/v1
BLOCKCHAIN_RPC_URL=http://127.0.0.1:8006
COORDINATOR_BASE_URL=http://127.0.0.1:8000
RATE_LIMIT_REQUESTS_PER_MINUTE=1000
RATE_LIMIT_WINDOW_SECONDS=60
# =========================
# Feature Flags
# =========================
ENABLE_CACHING=true
ENABLE_METRICS=true
ENABLE_LOGGING=true
ENABLE_SECURITY_MONITORING=true
# =========================
# Training Specific
# =========================
TRAINING_TIMEOUT=300
GENESIS_NODE=http://localhost:8006
FOLLOWER_NODE=http://localhost:8007