Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled
Documentation Validation / validate-policies-strict (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
CLI Tests / test-cli (push) Has been cancelled
Blockchain Synchronization Verification / sync-verification (push) Successful in 11s
Contract Performance Benchmarks / benchmark-gas-usage (push) Successful in 1m36s
Contract Performance Benchmarks / benchmark-execution-time (push) Successful in 1m24s
Contract Performance Benchmarks / benchmark-throughput (push) Successful in 1m25s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 5s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 3s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 2s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 2s
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Failing after 1m28s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 21s
Smart Contract Tests / test-foundry (push) Failing after 20s
Smart Contract Tests / lint-solidity (push) Successful in 30s
Smart Contract Tests / deploy-contracts (push) Successful in 1m40s
Systemd Sync / sync-systemd (push) Successful in 26s
Contract Performance Benchmarks / compare-benchmarks (push) Successful in 4s
- Update workflow paths from docs/openclaw to docs/hermes - Rename skill prefixes from openclaw-* to hermes-* - Update agent skill references in refactoring and analysis docs - Rename OPENCLAW_AITBC_MASTERY_PLAN.md to reflect hermes branding - Update CLI examples and command references throughout documentation
131 lines
3.7 KiB
Bash
Executable File
131 lines
3.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# AITBC Training Environment Setup Script
|
|
# Sets up mainnet environment for agent training with funded accounts and messaging
|
|
#
|
|
# DEPRECATED: This script is deprecated in favor of the Python-based setup system.
|
|
# Use: python -m aitbc.training_setup.cli setup
|
|
# See: /opt/aitbc/docs/agent-training/ENVIRONMENT_SETUP.md
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
AITBC_DIR="/opt/aitbc"
|
|
LOG_DIR="/var/log/aitbc/training-setup"
|
|
mkdir -p "$LOG_DIR"
|
|
|
|
# Colors
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m'
|
|
|
|
log() {
|
|
local level="$1"
|
|
shift
|
|
local message="$@"
|
|
local timestamp=$(date -Iseconds)
|
|
echo -e "${timestamp} [${level}] ${message}" | tee -a "$LOG_DIR/setup.log"
|
|
}
|
|
|
|
check_prerequisites() {
|
|
log "INFO" "Checking prerequisites..."
|
|
|
|
# Check AITBC CLI
|
|
if [ ! -f "$AITBC_DIR/aitbc-cli" ]; then
|
|
log "ERROR" "AITBC CLI not found at $AITBC_DIR/aitbc-cli"
|
|
return 1
|
|
fi
|
|
|
|
# Check AITBC node status
|
|
cd "$AITBC_DIR"
|
|
local node_status
|
|
node_status=$(./aitbc-cli blockchain info 2>&1 || echo "node_not_running")
|
|
if [[ "$node_status" == *"node_not_running"* ]] || [[ "$node_status" == *"error"* ]]; then
|
|
log "WARN" "AITBC node may not be running on mainnet"
|
|
else
|
|
log "INFO" "AITBC node detected: $(echo "$node_status" | head -1)"
|
|
fi
|
|
|
|
log "SUCCESS" "Prerequisites check completed"
|
|
return 0
|
|
}
|
|
|
|
setup_faucet() {
|
|
log "INFO" "Setting up faucet mechanism..."
|
|
|
|
if [ -f "$SCRIPT_DIR/setup_faucet.sh" ]; then
|
|
bash "$SCRIPT_DIR/setup_faucet.sh"
|
|
log "SUCCESS" "Faucet setup completed"
|
|
else
|
|
log "WARN" "Faucet setup script not found, skipping"
|
|
fi
|
|
}
|
|
|
|
fund_accounts() {
|
|
log "INFO" "Funding training accounts..."
|
|
|
|
if [ -f "$SCRIPT_DIR/fund_accounts.sh" ]; then
|
|
bash "$SCRIPT_DIR/fund_accounts.sh"
|
|
log "SUCCESS" "Account funding completed"
|
|
else
|
|
log "WARN" "Account funding script not found, skipping"
|
|
fi
|
|
}
|
|
|
|
configure_messaging() {
|
|
log "INFO" "Configuring messaging authentication..."
|
|
|
|
if [ -f "$SCRIPT_DIR/configure_messaging.sh" ]; then
|
|
bash "$SCRIPT_DIR/configure_messaging.sh"
|
|
log "SUCCESS" "Messaging configuration completed"
|
|
else
|
|
log "WARN" "Messaging configuration script not found, skipping"
|
|
fi
|
|
}
|
|
|
|
verify_environment() {
|
|
log "INFO" "Verifying training environment..."
|
|
|
|
cd "$AITBC_DIR"
|
|
|
|
# Check wallet list
|
|
local wallets
|
|
wallets=$(./aitbc-cli wallet list 2>&1 || echo "error")
|
|
if [[ "$wallets" != *"error"* ]]; then
|
|
log "INFO" "Wallets found: $(echo "$wallets" | grep -c "ait1" || echo "0")"
|
|
fi
|
|
|
|
# Check blockchain status
|
|
local chain_status
|
|
chain_status=$(./aitbc-cli blockchain info 2>&1 || echo "error")
|
|
if [[ "$chain_status" != *"error"* ]]; then
|
|
log "INFO" "Blockchain status: $(echo "$chain_status" | head -1)"
|
|
fi
|
|
|
|
log "SUCCESS" "Environment verification completed"
|
|
}
|
|
|
|
main() {
|
|
log "INFO" "Starting AITBC training environment setup..."
|
|
|
|
check_prerequisites || exit 1
|
|
setup_faucet
|
|
fund_accounts
|
|
configure_messaging
|
|
verify_environment
|
|
|
|
log "SUCCESS" "Training environment setup completed"
|
|
echo ""
|
|
echo -e "${GREEN}=== Setup Summary ===${NC}"
|
|
echo "Training environment is ready for agent training"
|
|
echo "Log file: $LOG_DIR/setup.log"
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo "1. Run Stage 1 training: ./aitbc-cli hermes-training train agent --agent-id <agent-id> --stage stage1_foundation"
|
|
echo "2. Verify wallet funding before transaction operations"
|
|
echo "3. Check messaging authentication before messaging operations"
|
|
}
|
|
|
|
main "$@"
|