Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Has been cancelled
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Has been cancelled
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Has been cancelled
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been cancelled
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Has been cancelled
Cross-Chain Functionality Tests / aggregate-results (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- Change DatabaseMempool lock from Lock to RLock to prevent self-deadlock in add() -> _update_gauge() -> size() call chain - Switch aitbc-blockchain-node.service from combined_main to aitbc_chain.main to avoid port 8006 conflict with RPC service - Enable block production in node service (RPC remains disabled) This fixes POST /rpc/transaction timeout for funded senders and allows genesis-to-training-wallet funding to complete successfully.
39 lines
1.2 KiB
Python
Executable File
39 lines
1.2 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
Wrapper script for aitbc-blockchain-node service
|
|
Uses centralized aitbc utilities for path configuration
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
from pathlib import Path
|
|
|
|
# Add aitbc to path
|
|
sys.path.insert(0, str(Path("/opt/aitbc")))
|
|
sys.path.insert(0, str(Path("/opt/aitbc/aitbc")))
|
|
|
|
from aitbc import ENV_FILE, NODE_ENV_FILE, REPO_DIR, DATA_DIR, LOG_DIR
|
|
|
|
# Set up environment using aitbc constants
|
|
os.environ["AITBC_ENV_FILE"] = str(ENV_FILE)
|
|
os.environ["AITBC_NODE_ENV_FILE"] = str(NODE_ENV_FILE)
|
|
os.environ["PYTHONPATH"] = f"{REPO_DIR}/apps/blockchain-node/src"
|
|
os.environ["DATA_DIR"] = str(DATA_DIR)
|
|
os.environ["LOG_DIR"] = str(LOG_DIR)
|
|
|
|
# Force disable block production in combined_main to prevent event loop blocking
|
|
# The combined_main runs both node logic and HTTP RPC server in the same process
|
|
# Block production in the RPC process can cause timeouts during transaction submission
|
|
os.environ["AITBC_FORCE_ENABLE_BLOCK_PRODUCTION"] = "true"
|
|
os.environ["ENABLE_BLOCK_PRODUCTION"] = "true"
|
|
os.environ["enable_block_production"] = "true"
|
|
|
|
# Execute the actual service
|
|
# Use combined_main to run both blockchain node and HTTP RPC server
|
|
exec_cmd = [
|
|
"/opt/aitbc/venv/bin/python",
|
|
"-m",
|
|
"aitbc_chain.main"
|
|
]
|
|
os.execvp(exec_cmd[0], exec_cmd)
|