Files
aitbc/systemd/aitbc-blockchain-p2p.service
aitbc 5c09774e06
Some checks failed
Systemd Sync / sync-systemd (push) Waiting to run
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
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
2026-04-09 12:07:34 +02:00

21 lines
635 B
Desktop File

[Unit]
Description=AITBC Blockchain P2P Network Service
After=network.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/aitbc/apps/blockchain-node
Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/aitbc/apps/blockchain-node/src:/opt/aitbc/apps/blockchain-node/scripts
EnvironmentFile=/etc/aitbc/blockchain.env
ExecStart=/opt/aitbc/venv/bin/python -m aitbc_chain.p2p_network --host ${p2p_bind_host} --port ${p2p_bind_port} --peers ${p2p_peers} --node-id ${proposer_id}
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target