refactor: simplify .env.example and add bulk sync capabilities
Some checks failed
AITBC CI/CD Pipeline / lint-and-test (3.11) (pull_request) Has been cancelled
AITBC CI/CD Pipeline / lint-and-test (3.12) (pull_request) Has been cancelled
AITBC CI/CD Pipeline / lint-and-test (3.13) (pull_request) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.11) (pull_request) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.12) (pull_request) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.13) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (apps/coordinator-api/src) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (cli/aitbc_cli) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-core/src) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-crypto/src) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-sdk/src) (pull_request) Has been cancelled
Security Scanning / Bandit Security Scan (tests) (pull_request) Has been cancelled
Security Scanning / CodeQL Security Analysis (javascript) (pull_request) Has been cancelled
Security Scanning / CodeQL Security Analysis (python) (pull_request) Has been cancelled
Security Scanning / Dependency Security Scan (pull_request) Has been cancelled
Security Scanning / Container Security Scan (pull_request) Has been cancelled
Security Scanning / OSSF Scorecard (pull_request) Has been cancelled
AITBC CI/CD Pipeline / test-cli (pull_request) Has been cancelled
AITBC CI/CD Pipeline / test-services (pull_request) Has been cancelled
AITBC CI/CD Pipeline / test-production-services (pull_request) Has been cancelled
AITBC CI/CD Pipeline / security-scan (pull_request) Has been cancelled
AITBC CI/CD Pipeline / build (pull_request) Has been cancelled
AITBC CI/CD Pipeline / deploy-staging (pull_request) Has been cancelled
AITBC CI/CD Pipeline / deploy-production (pull_request) Has been cancelled
AITBC CI/CD Pipeline / performance-test (pull_request) Has been cancelled
AITBC CI/CD Pipeline / docs (pull_request) Has been cancelled
AITBC CI/CD Pipeline / release (pull_request) Has been cancelled
AITBC CI/CD Pipeline / notify (pull_request) Has been cancelled
AITBC CLI Level 1 Commands Test / test-summary (pull_request) Has been cancelled
Security Scanning / Security Summary Report (pull_request) Has been cancelled

- Simplify .env.example to show actual config values instead of instructions
- Add blockchain core, coordinator API, and marketplace web example sections
- Add bulk import functionality to ChainSync for faster catchup
- Add fetch_blocks_range and bulk_import_from methods with batching
- Add init-production command to genesis CLI for production chain setup
- Add HTTP client management with configurable batch size and poll interval
This commit is contained in:
2026-03-20 12:17:30 +01:00
parent 4c3db7c019
commit e0b0f901ef
4 changed files with 202 additions and 59 deletions

View File

@@ -1,63 +1,59 @@
# AITBC Environment Configuration
# SECURITY NOTICE: Use service-specific environment files
#
# For development, copy from:
# config/environments/development/coordinator.env
# config/environments/development/wallet-daemon.env
#
# For production, use AWS Secrets Manager and Kubernetes secrets
# Templates available in config/environments/production/
# AITBC Central Environment Example Template
# SECURITY NOTICE: Use a secrets manager for production. Do not commit real secrets.
# Run: python config/security/environment-audit.py --format text
# =============================================================================
# BASIC CONFIGURATION ONLY
# =============================================================================
# Application Environment
# =========================
# Blockchain core (example values)
# =========================
chain_id=ait-devnet
supported_chains=ait-devnet
rpc_bind_host=127.0.0.1
rpc_bind_port=8006
p2p_bind_host=127.0.0.2
p2p_bind_port=8005
proposer_id=ait-devnet-proposer
proposer_key=
keystore_path=./keystore
keystore_password_file=./keystore/.password
gossip_backend=memory
gossip_broadcast_url=
db_path=./data/chain.db
mint_per_unit=0
coordinator_ratio=0.05
block_time_seconds=2
enable_block_production=false
# =========================
# Coordinator API (example values)
# =========================
APP_ENV=development
DEBUG=false
LOG_LEVEL=INFO
APP_HOST=127.0.0.1
APP_PORT=8011
DATABASE__URL=sqlite:////opt/aitbc/data/coordinator/coordinator.db
BLOCKCHAIN_RPC_URL=http://127.0.0.1:8006
ALLOW_ORIGINS=["http://localhost:8011","http://localhost:8000"]
JOB_TTL_SECONDS=900
HEARTBEAT_INTERVAL_SECONDS=10
HEARTBEAT_TIMEOUT_SECONDS=30
RATE_LIMIT_REQUESTS=60
RATE_LIMIT_WINDOW_SECONDS=60
CLIENT_API_KEYS=["client_dev_key"]
MINER_API_KEYS=["miner_dev_key"]
ADMIN_API_KEYS=["admin_dev_key"]
HMAC_SECRET=change_this_to_a_32_byte_random_secret
JWT_SECRET=change_this_to_another_32_byte_random_secret
# =============================================================================
# SECURITY REQUIREMENTS
# =============================================================================
# IMPORTANT: Do NOT store actual secrets in this file
# Use AWS Secrets Manager for production
# Generate secure keys with: openssl rand -hex 32
# =========================
# Marketplace Web (example values)
# =========================
VITE_MARKETPLACE_DATA_MODE=mock
VITE_MARKETPLACE_API=/api
VITE_MARKETPLACE_ENABLE_BIDS=false
VITE_MARKETPLACE_REQUIRE_AUTH=false
# =============================================================================
# SERVICE CONFIGURATION
# =============================================================================
# Choose your service configuration:
# 1. Copy service-specific .env file from config/environments/
# 2. Fill in actual values (NEVER commit secrets)
# 3. Run: python config/security/environment-audit.py
# =============================================================================
# DEVELOPMENT QUICK START
# =============================================================================
# For quick development setup:
# cp config/environments/development/coordinator.env .env
# cp config/environments/development/wallet-daemon.env .env.wallet
#
# Then edit the copied files with your values
# =============================================================================
# PRODUCTION DEPLOYMENT
# =============================================================================
# For production deployment:
# 1. Use AWS Secrets Manager for all sensitive values
# 2. Reference secrets as: secretRef:secret-name:key
# 3. Run security audit before deployment
# 4. Use templates in config/environments/production/
# =============================================================================
# SECURITY VALIDATION
# =============================================================================
# Validate your configuration:
# python config/security/environment-audit.py --format text
# =============================================================================
# FOR MORE INFORMATION
# =============================================================================
# See: config/security/secret-validation.yaml
# See: config/security/environment-audit.py
# See: config/environments/ directory
# =========================
# Notes
# =========================
# For production: copy this to .env and replace with real values/secrets
# Move secrets to a secrets manager and reference via secretRef
# Validate config: python config/security/environment-audit.py --format text