fix: update training script NODE_URL to use port 8005
Updated training script and library to use HTTP RPC port 8005 instead of blockchain protocol port 8006 for all NODE_URL environment variable settings. Changes: - stage1_foundation.sh: Updated NODE_URL from 8006 to 8005 in all commands - training_lib.sh: Updated GENESIS_NODE and FOLLOWER_NODE to use port 8005 - training_lib.sh: Updated service endpoints to show 8005 as RPC endpoint This fixes the wallet balance timeout errors where CLI was trying to connect to port 8006 (blockchain protocol) instead of port 8005 (HTTP RPC API).
This commit is contained in:
@@ -30,7 +30,7 @@ genesis_block_initialization() {
|
||||
return 0
|
||||
|
||||
print_status "Initializing blockchain on Follower Node..."
|
||||
if NODE_URL="http://aitbc1:8006" cli_cmd "blockchain init --force"; then
|
||||
if NODE_URL="http://aitbc1:8005" cli_cmd "blockchain init --force"; then
|
||||
print_success "Blockchain initialized on Follower Node"
|
||||
else
|
||||
print_warning "Blockchain may already be initialized on Follower Node"
|
||||
@@ -60,24 +60,24 @@ genesis_block_initialization() {
|
||||
print_status "Funding training wallet from genesis block initial coins..."
|
||||
# The genesis block contains actual AIT coins - mine a block to get the reward
|
||||
print_status "Starting mining to get genesis block reward..."
|
||||
if NODE_URL="http://localhost:8006" cli_cmd "mining start --wallet $WALLET_NAME"; then
|
||||
if NODE_URL="http://localhost:8005" cli_cmd "mining start --wallet $WALLET_NAME"; then
|
||||
print_success "Mining started for wallet $WALLET_NAME"
|
||||
sleep 5 # Wait for mining to produce a block
|
||||
|
||||
print_status "Checking mining status..."
|
||||
NODE_URL="http://localhost:8006" cli_cmd "mining status --wallet $WALLET_NAME" || print_warning "Mining status check failed"
|
||||
NODE_URL="http://localhost:8005" cli_cmd "mining status --wallet $WALLET_NAME" || print_warning "Mining status check failed"
|
||||
|
||||
print_status "Checking mining rewards..."
|
||||
NODE_URL="http://localhost:8006" cli_cmd "mining rewards --wallet $WALLET_NAME" || print_warning "Mining rewards check failed"
|
||||
NODE_URL="http://localhost:8005" cli_cmd "mining rewards --wallet $WALLET_NAME" || print_warning "Mining rewards check failed"
|
||||
|
||||
print_status "Stopping mining after obtaining genesis reward..."
|
||||
NODE_URL="http://localhost:8006" cli_cmd "mining stop" || print_warning "Mining stop failed"
|
||||
NODE_URL="http://localhost:8005" cli_cmd "mining stop" || print_warning "Mining stop failed"
|
||||
else
|
||||
print_warning "Mining start failed - wallet may not have initial funds"
|
||||
fi
|
||||
|
||||
print_status "Verifying wallet balance after mining genesis block..."
|
||||
NODE_URL="http://localhost:8006" cli_cmd "wallet balance $WALLET_NAME" || print_warning "Balance check failed"
|
||||
NODE_URL="http://localhost:8005" cli_cmd "wallet balance $WALLET_NAME" || print_warning "Balance check failed"
|
||||
|
||||
update_progress "Genesis Block Initialization"
|
||||
}
|
||||
|
||||
@@ -19,15 +19,15 @@ export LOG_DIR="${LOG_DIR:-/var/log/aitbc}"
|
||||
export WALLET_NAME="${WALLET_NAME:-openclaw-trainee}"
|
||||
export WALLET_PASSWORD="${WALLET_PASSWORD:-trainee123}"
|
||||
export TRAINING_TIMEOUT="${TRAINING_TIMEOUT:-300}"
|
||||
export GENESIS_NODE="http://localhost:8006"
|
||||
export FOLLOWER_NODE="http://aitbc1:8006"
|
||||
export GENESIS_NODE="http://localhost:8005"
|
||||
export FOLLOWER_NODE="http://aitbc1:8005"
|
||||
|
||||
# Service endpoints
|
||||
export SERVICES=(
|
||||
"8001:Exchange"
|
||||
"9001:Agent-Coordinator"
|
||||
"8006:Genesis-Node"
|
||||
"8006:Follower-Node"
|
||||
"8005:Genesis-Node-RPC"
|
||||
"8005:Follower-Node-RPC"
|
||||
"11434:Ollama"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user