diff --git a/cli/advanced_wallet.py b/cli/advanced_wallet.py index 83934c99..cd8a61d3 100644 --- a/cli/advanced_wallet.py +++ b/cli/advanced_wallet.py @@ -13,7 +13,7 @@ import requests # Default paths DEFAULT_KEYSTORE_DIR = Path("/var/lib/aitbc/keystore") -DEFAULT_RPC_URL = "http://localhost:8005" +DEFAULT_RPC_URL = "http://localhost:8006" # Note: Legacy simple_wallet.py module has been replaced by unified CLI # This file should use the new nested CLI structure via subprocess calls diff --git a/cli/commands/blockchain.py b/cli/commands/blockchain.py index c15e29ad..295f4112 100755 --- a/cli/commands/blockchain.py +++ b/cli/commands/blockchain.py @@ -10,7 +10,7 @@ def _get_node_endpoint(ctx): # Use the new blockchain_rpc_url from config return config.blockchain_rpc_url except: - return "http://127.0.0.1:8005" # Use HTTP RPC port (not blockchain protocol port) + return "http://127.0.0.1:8006" # Default blockchain RPC port from typing import Optional, List from utils import output, error diff --git a/cli/commands/blockchain_event_bridge.py b/cli/commands/blockchain_event_bridge.py index 63a7eb83..0e6f2592 100644 --- a/cli/commands/blockchain_event_bridge.py +++ b/cli/commands/blockchain_event_bridge.py @@ -231,7 +231,7 @@ def config(test_mode): if test_mode: # Mock data for testing mock_config = { - "blockchain_rpc_url": "http://localhost:8005", + "blockchain_rpc_url": "http://localhost:8006", "gossip_backend": "redis", "gossip_broadcast_url": "redis://localhost:6379", "coordinator_api_url": "http://localhost:8011", diff --git a/cli/commands/deployment.py b/cli/commands/deployment.py index 72808391..4f5b940e 100644 --- a/cli/commands/deployment.py +++ b/cli/commands/deployment.py @@ -79,7 +79,7 @@ def status(service): checks = [ "Coordinator API: http://localhost:8011/health", - "Blockchain Node RPC: http://localhost:8005/health", + "Blockchain Node RPC: http://localhost:8006/health", "Marketplace: http://localhost:8001/health", "Wallet Service: http://localhost:8003/status" ] diff --git a/cli/commands/marketplace.py b/cli/commands/marketplace.py index 5a531758..7f0ae1a3 100755 --- a/cli/commands/marketplace.py +++ b/cli/commands/marketplace.py @@ -267,7 +267,7 @@ def pay(ctx, booking_id: str, amount: float, from_wallet: str, to_wallet: str, t # Get wallet balance from blockchain from aitbc_cli.utils.chain_id import get_chain_id - rpc_url = config.get('rpc_url', 'http://localhost:8005') + rpc_url = config.get('rpc_url', 'http://localhost:8006') chain_id = get_chain_id(rpc_url) balance_response = httpx.Client().get(f"{rpc_url}/rpc/account/{address}?chain_id={chain_id}", timeout=5) if balance_response.status_code != 200: diff --git a/cli/commands/sync.py b/cli/commands/sync.py index 718e5915..dc2fd888 100644 --- a/cli/commands/sync.py +++ b/cli/commands/sync.py @@ -17,8 +17,8 @@ def sync(): @sync.command() -@click.option('--source', default=lambda: os.getenv('AITBC_SYNC_SOURCE_URL', 'http://127.0.0.1:8005'), help='Source RPC URL (leader)') -@click.option('--import-url', default='http://127.0.0.1:8005', help='Local RPC URL for import') +@click.option('--source', default=lambda: os.getenv('AITBC_SYNC_SOURCE_URL', 'http://127.0.0.1:8006'), help='Source RPC URL (leader)') +@click.option('--import-url', default='http://127.0.0.1:8006', help='Local RPC URL for import') @click.option('--batch-size', type=int, default=100, help='Blocks per batch') @click.option('--poll-interval', type=float, default=0.2, help='Seconds between batches') def bulk(source, import_url, batch_size, poll_interval): diff --git a/cli/core/main.py b/cli/core/main.py index d43161d2..ec2c7874 100644 --- a/cli/core/main.py +++ b/cli/core/main.py @@ -151,7 +151,7 @@ def cli(ctx, url, api_key, chain_id, output, verbose, debug): # Handle chain_id with auto-detection from aitbc_cli.utils.chain_id import get_chain_id, get_default_chain_id - default_rpc_url = url.replace('/api', '') if url else 'http://localhost:8005' + default_rpc_url = url.replace('/api', '') if url else 'http://localhost:8006' ctx.obj['chain_id'] = get_chain_id(default_rpc_url, override=chain_id) # Add commands to CLI diff --git a/cli/enterprise_cli.py b/cli/enterprise_cli.py index 5e914c7b..c1f36b1c 100755 --- a/cli/enterprise_cli.py +++ b/cli/enterprise_cli.py @@ -16,7 +16,7 @@ from aitbc.paths import get_keystore_path # Default paths DEFAULT_KEYSTORE_DIR = get_keystore_path() -DEFAULT_RPC_URL = "http://localhost:8005" +DEFAULT_RPC_URL = "http://localhost:8006" def get_password(password_arg: str = None, password_file: str = None) -> str: """Get password from various sources""" diff --git a/cli/handlers/bridge.py b/cli/handlers/bridge.py index 7be76ade..43d26439 100644 --- a/cli/handlers/bridge.py +++ b/cli/handlers/bridge.py @@ -87,7 +87,7 @@ def handle_bridge_config(args): if args.test_mode: print("⚙️ Blockchain Event Bridge Configuration (test mode):") - print("🔗 Blockchain RPC URL: http://localhost:8005") + print("🔗 Blockchain RPC URL: http://localhost:8006") print("💬 Gossip Backend: redis") return diff --git a/scripts/training/stage1_foundation.sh b/scripts/training/stage1_foundation.sh index 2337b195..4ca75d5d 100755 --- a/scripts/training/stage1_foundation.sh +++ b/scripts/training/stage1_foundation.sh @@ -30,54 +30,54 @@ genesis_block_initialization() { return 0 print_status "Initializing blockchain on Follower Node..." - if NODE_URL="http://aitbc1:8005" cli_cmd "blockchain init --force"; then + if NODE_URL="http://aitbc1:8006" cli_cmd "blockchain init --force"; then print_success "Blockchain initialized on Follower Node" else print_warning "Blockchain may already be initialized on Follower Node" fi - print_status "Verifying RPC connectivity to Genesis Node (port 8005)..." - if curl -s --max-time 5 http://localhost:8005/health > /dev/null 2>&1; then - print_success "Genesis Node RPC (port 8005) is accessible" + print_status "Verifying RPC connectivity to Genesis Node (port 8006)..." + if curl -s --max-time 5 http://localhost:8006/health > /dev/null 2>&1; then + print_success "Genesis Node RPC (port 8006) is accessible" else - print_warning "Genesis Node RPC (port 8005) is not accessible" + print_warning "Genesis Node RPC (port 8006) is not accessible" fi - print_status "Verifying RPC connectivity to Follower Node (port 8005 on aitbc1)..." - if curl -s --max-time 5 http://aitbc1:8005/health > /dev/null 2>&1; then - print_success "Follower Node RPC (port 8005 on aitbc1) is accessible" + print_status "Verifying RPC connectivity to Follower Node (port 8006 on aitbc1)..." + if curl -s --max-time 5 http://aitbc1:8006/health > /dev/null 2>&1; then + print_success "Follower Node RPC (port 8006 on aitbc1) is accessible" else - print_warning "Follower Node RPC (port 8005 on aitbc1) is not accessible" + print_warning "Follower Node RPC (port 8006 on aitbc1) is not accessible" fi - print_status "Verifying Follower Node RPC also runs on port 8005..." - if ssh aitbc1 "curl -s --max-time 5 http://localhost:8005/health" > /dev/null 2>&1; then - print_success "Follower Node RPC also accessible on port 8005" + print_status "Verifying Follower Node RPC also runs on port 8006..." + if ssh aitbc1 "curl -s --max-time 5 http://localhost:8006/health" > /dev/null 2>&1; then + print_success "Follower Node RPC also accessible on port 8006" else - print_warning "Follower Node RPC not accessible on port 8005 (check follower node health)" + print_warning "Follower Node RPC not accessible on port 8006 (check follower node health)" fi 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:8005" cli_cmd "mining start --wallet $WALLET_NAME"; then + if NODE_URL="http://localhost:8006" 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:8005" cli_cmd "mining status --wallet $WALLET_NAME" || print_warning "Mining status check failed" + NODE_URL="http://localhost:8006" cli_cmd "mining status --wallet $WALLET_NAME" || print_warning "Mining status check failed" print_status "Checking mining rewards..." - NODE_URL="http://localhost:8005" cli_cmd "mining rewards --wallet $WALLET_NAME" || print_warning "Mining rewards check failed" + NODE_URL="http://localhost:8006" 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:8005" cli_cmd "mining stop" || print_warning "Mining stop failed" + NODE_URL="http://localhost:8006" 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:8005" cli_cmd "wallet balance $WALLET_NAME" || print_warning "Balance check failed" + NODE_URL="http://localhost:8006" cli_cmd "wallet balance $WALLET_NAME" || print_warning "Balance check failed" update_progress "Genesis Block Initialization" } diff --git a/scripts/training/training_lib.sh b/scripts/training/training_lib.sh index 12f12921..b803fa7f 100755 --- a/scripts/training/training_lib.sh +++ b/scripts/training/training_lib.sh @@ -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:8005" -export FOLLOWER_NODE="http://aitbc1:8005" +export GENESIS_NODE="http://localhost:8006" +export FOLLOWER_NODE="http://aitbc1:8006" # Service endpoints export SERVICES=( "8001:Exchange" "9001:Agent-Coordinator" - "8005:Genesis-Node-RPC" - "8005:Follower-Node-RPC" + "8006:Genesis-Node-RPC" + "8006:Follower-Node-RPC" "11434:Ollama" )