refactor: migrate P2P network from Redis gossip to direct TCP mesh architecture
- Replaced Redis-based P2P with direct TCP connections for decentralized mesh networking - Added handshake protocol with node_id exchange for peer authentication - Implemented bidirectional connection management (inbound/outbound streams) - Added peer dialing loop to continuously reconnect to initial peers - Added ping/pong keepalive mechanism to maintain active connections - Prevented duplicate connections through endpoint
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
[Unit]
|
||||
Description=AITBC Blockchain Follower Node (Port 8007)
|
||||
After=network.target aitbc-blockchain-node.service
|
||||
Wants=aitbc-blockchain-node.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
Environment=NODE_ENV=production
|
||||
Environment=NODE_ID=follower-node-8007
|
||||
Environment=PYTHONPATH=/opt/aitbc/apps/blockchain-node/src:/opt/aitbc/services
|
||||
Environment=BLOCKCHAIN_DATA_DIR=/var/lib/aitbc/data/follower
|
||||
Environment=BLOCKCHAIN_CONFIG_DIR=/etc/aitbc
|
||||
Environment=BLOCKCHAIN_LOG_DIR=/var/log/aitbc/production
|
||||
Environment=BLOCKCHAIN_PORT=8007
|
||||
Environment=BLOCKCHAIN_ROLE=follower
|
||||
Environment=BLOCKCHAIN_GENESIS_NODE=http://localhost:8006
|
||||
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/blockchain_simple.py
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=mixed
|
||||
TimeoutStopSec=30
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user