diff --git a/cli/advanced_wallet.py b/cli/advanced_wallet.py index cd8a61d3..83934c99 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:8006" +DEFAULT_RPC_URL = "http://localhost:8005" # 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 446853c8..c15e29ad 100755 --- a/cli/commands/blockchain.py +++ b/cli/commands/blockchain.py @@ -4,12 +4,13 @@ import click import httpx def _get_node_endpoint(ctx): + """Get the blockchain node RPC endpoint from context or config.""" try: config = ctx.obj['config'] # Use the new blockchain_rpc_url from config return config.blockchain_rpc_url except: - return "http://127.0.0.1:8006" # Use new blockchain RPC port + return "http://127.0.0.1:8005" # Use HTTP RPC port (not blockchain protocol 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 0e6f2592..63a7eb83 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:8006", + "blockchain_rpc_url": "http://localhost:8005", "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 fbf9e74b..72808391 100644 --- a/cli/commands/deployment.py +++ b/cli/commands/deployment.py @@ -78,9 +78,9 @@ def status(service): output(f"📊 Deployment Status Check for {service or 'All Services'}", None) checks = [ - "Coordinator API: http://localhost:8000/health", - "Blockchain Node: http://localhost:8006/status", - "Marketplace: http://localhost:8002/health", + "Coordinator API: http://localhost:8011/health", + "Blockchain Node RPC: http://localhost:8005/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 7f0ae1a3..5a531758 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:8006') + rpc_url = config.get('rpc_url', 'http://localhost:8005') 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 dc2fd888..718e5915 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: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('--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('--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 ec2c7874..d43161d2 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:8006' + default_rpc_url = url.replace('/api', '') if url else 'http://localhost:8005' 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 c1f36b1c..5e914c7b 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:8006" +DEFAULT_RPC_URL = "http://localhost:8005" 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 43d26439..7be76ade 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:8006") + print("🔗 Blockchain RPC URL: http://localhost:8005") print("💬 Gossip Backend: redis") return