From 376289c4e2a7c62787127e8e8740e5bbb6010a31 Mon Sep 17 00:00:00 2001 From: aitbc Date: Mon, 30 Mar 2026 17:42:32 +0200 Subject: [PATCH] fix: add blockchain-node.service to setup as it's required by RPC service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blockchain Node Service Addition - Complete: ✅ BLOCKCHAIN NODE SERVICE ADDED: Added aitbc-blockchain-node.service to setup process - setup.sh: Added blockchain-node.service to services installation list - setup.sh: Updated start_services to include blockchain services - setup.sh: Updated setup_autostart to enable blockchain services - Reason: RPC service depends on blockchain node service ✅ DEPENDENCY ANALYSIS: 🔗 aitbc-blockchain-rpc.service: Has 'After=aitbc-blockchain-node.service' 📋 Dependency Chain: RPC service requires blockchain node to be running first 🎯 Core Functionality: Blockchain node is essential for AITBC operation 📁 App Directory: /opt/aitbc/apps/blockchain-node/ exists ✅ SERVICE INSTALLATION ORDER: 1. aitbc-wallet.service 2. aitbc-coordinator-api.service 3. aitbc-exchange-api.service 4. aitbc-blockchain-node.service (NEW) 5. aitbc-blockchain-rpc.service ✅ UPDATED FUNCTIONS: 📦 install_services(): Added aitbc-blockchain-node.service to services array 🚀 start_services(): Added blockchain services to systemctl start command 🔄 setup_autostart(): Added blockchain services to systemctl enable command 📋 Status Check: Added blockchain services to systemctl is-active check ✅ SERVICE STARTUP SEQUENCE: 🔧 Proper Order: Blockchain node starts before RPC service 🎯 Dependencies: RPC service waits for blockchain node to be ready 📊 Health Check: All services checked for active status ⚡ Auto-Start: All services enabled for boot-time startup ✅ TECHNICAL CORRECTNESS: ✅ Dependency Resolution: RPC service will wait for blockchain node ✅ Service Management: All blockchain services managed by systemd ✅ Startup Order: Correct sequence for dependent services ✅ Auto-Start: All services start automatically on boot ✅ COMPLETE BLOCKCHAIN STACK: 🔗 aitbc-blockchain-node.service: Core blockchain node 🔗 aitbc-blockchain-rpc.service: RPC API for blockchain 🔗 aitbc-wallet.service: Wallet service 🔗 aitbc-coordinator-api.service: Coordinator API 🔗 aitbc-exchange-api.service: Exchange API RESULT: Successfully added blockchain-node.service to setup process, ensuring proper dependency chain and complete blockchain functionality. The RPC service will now work correctly with the blockchain node running as required. --- setup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 1eba58c7..0286211a 100755 --- a/setup.sh +++ b/setup.sh @@ -162,6 +162,7 @@ install_services() { "aitbc-wallet.service" "aitbc-coordinator-api.service" "aitbc-exchange-api.service" + "aitbc-blockchain-node.service" "aitbc-blockchain-rpc.service" ) @@ -238,12 +239,12 @@ start_services() { log "Starting AITBC services..." # Try systemd first - if systemctl start aitbc-wallet aitbc-coordinator-api aitbc-exchange-api 2>/dev/null; then + if systemctl start aitbc-wallet aitbc-coordinator-api aitbc-exchange-api aitbc-blockchain-node aitbc-blockchain-rpc 2>/dev/null; then log "Services started via systemd" sleep 5 # Check if services are running - if systemctl is-active --quiet aitbc-wallet aitbc-coordinator-api aitbc-exchange-api; then + if systemctl is-active --quiet aitbc-wallet aitbc-coordinator-api aitbc-exchange-api aitbc-blockchain-node aitbc-blockchain-rpc; then success "Services started successfully via systemd" else warning "Some systemd services failed, falling back to manual startup" @@ -269,6 +270,7 @@ setup_autostart() { systemctl enable aitbc-wallet.service systemctl enable aitbc-coordinator-api.service systemctl enable aitbc-exchange-api.service + systemctl enable aitbc-blockchain-node.service systemctl enable aitbc-blockchain-rpc.service success "Auto-start configured"