From e01fb36db8db363ae6403f7ebe0d422c4fe3ab22 Mon Sep 17 00:00:00 2001 From: aitbc Date: Tue, 28 Apr 2026 08:38:43 +0200 Subject: [PATCH] fix: change blockchain sync default hosts from 10.1.223.40 to localhost and disable block production in RPC service Update blockchain-sync-wrapper.py to use 127.0.0.1 as default for SYNC_LEADER_HOST, SYNC_SOURCE_HOST, and SYNC_IMPORT_HOST instead of hardcoded 10.1.223.40. Replace UnsetEnvironment directive with explicit enable_block_production=false in blockchain-rpc.service to ensure block production is disabled. --- scripts/wrappers/aitbc-blockchain-sync-wrapper.py | 6 +++--- systemd/aitbc-blockchain-rpc.service | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/wrappers/aitbc-blockchain-sync-wrapper.py b/scripts/wrappers/aitbc-blockchain-sync-wrapper.py index bf465b87..a07b445c 100755 --- a/scripts/wrappers/aitbc-blockchain-sync-wrapper.py +++ b/scripts/wrappers/aitbc-blockchain-sync-wrapper.py @@ -25,10 +25,10 @@ os.environ["LOG_DIR"] = str(LOG_DIR) redis_url = os.getenv("SYNC_REDIS_URL", "redis://localhost:6379") node_id = os.getenv("SYNC_NODE_ID", "ait18yefwwclgmyu2a74zvv0hj3a3xw6gxsn4akrj963kp069j9xy5ns3kurun") rpc_port = os.getenv("SYNC_RPC_PORT", "8006") -leader_host = os.getenv("SYNC_LEADER_HOST", "10.1.223.40") -source_host = os.getenv("SYNC_SOURCE_HOST", "10.1.223.40") +leader_host = os.getenv("SYNC_LEADER_HOST", "127.0.0.1") +source_host = os.getenv("SYNC_SOURCE_HOST", "127.0.0.1") source_port = os.getenv("SYNC_SOURCE_PORT", "8006") -import_host = os.getenv("SYNC_IMPORT_HOST", "10.1.223.40") +import_host = os.getenv("SYNC_IMPORT_HOST", "127.0.0.1") import_port = os.getenv("SYNC_IMPORT_PORT", "8006") # Execute the actual service diff --git a/systemd/aitbc-blockchain-rpc.service b/systemd/aitbc-blockchain-rpc.service index 57577b2e..94a77860 100644 --- a/systemd/aitbc-blockchain-rpc.service +++ b/systemd/aitbc-blockchain-rpc.service @@ -12,7 +12,7 @@ ExecStartPre=/opt/aitbc/scripts/utils/load-keystore-secrets.sh EnvironmentFile=/run/aitbc/secrets/.env EnvironmentFile=/etc/aitbc/.env EnvironmentFile=/etc/aitbc/node.env -UnsetEnvironment=enable_block_production ENABLE_BLOCK_PRODUCTION +Environment=enable_block_production=false ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/scripts/wrappers/aitbc-blockchain-rpc-wrapper.py Restart=always RestartSec=5