Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 8s
CLI Tests / test-cli (push) Successful in 10s
Contract Performance Benchmarks / benchmark-gas-usage (push) Successful in 1m22s
Contract Performance Benchmarks / benchmark-execution-time (push) Successful in 1m11s
Contract Performance Benchmarks / benchmark-throughput (push) Successful in 1m13s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 5s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 5s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 3s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 5s
Deploy to Testnet / deploy-testnet (push) Successful in 1m14s
Contract Performance Benchmarks / compare-benchmarks (push) Has been cancelled
Documentation Validation / validate-docs (push) Failing after 10s
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Has been cancelled
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Has been cancelled
Smart Contract Tests / test-foundry (push) Has been cancelled
Smart Contract Tests / lint-solidity (push) Has been cancelled
Smart Contract Tests / deploy-contracts (push) Has been cancelled
Documentation Validation / validate-policies-strict (push) Successful in 3s
Integration Tests / test-service-integration (push) Failing after 45s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Failing after 2s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 3s
Production Tests / Production Integration Tests (push) Failing after 7s
Python Tests / test-python (push) Failing after 46s
Staking Tests / test-staking-service (push) Failing after 2s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Systemd Sync / sync-systemd (push) Successful in 21s
API Endpoint Tests / test-api-endpoints (push) Failing after 12m19s
- Changed pytest calls to use `venv/bin/python -m pytest` with explicit config - Added `--rootdir "$PWD"` and `--import-mode=importlib` for consistent imports - Fixed PYTHONPATH to use absolute paths with $PWD prefix - Added smart contract security scanning for Solidity files - Added Circom circuit security checks for ZK proof circuits - Added ZK proof implementation security validation - Added contracts/** to security scanning workflow
3.0 KiB
3.0 KiB
AITBC Remote Deployment Guide
Overview
This deployment strategy builds the blockchain node directly on the ns3 server to utilize its gigabit connection, avoiding slow uploads from localhost.
For new-host bootstrap, start with SETUP.md, which documents the main scripts/setup.sh entry point.
Quick Start
1. Deploy Everything
./scripts/deploy/deploy-all-remote.sh
This will:
- Copy deployment scripts to ns3
- Copy blockchain source code from localhost
- Build blockchain node directly on server
- Deploy a lightweight HTML-based explorer
- Configure port forwarding
2. Access Services
Blockchain Node RPC:
- Internal: http://localhost:8082
- External: http://aitbc.keisanki.net:8082
Blockchain Explorer:
- Internal: http://localhost:3000
- External: http://aitbc.keisanki.net:3000
Architecture
ns3-root (95.216.198.140)
├── Blockchain Node (port 8082)
│ ├── Auto-syncs on startup
│ └── Serves RPC API
└── Explorer (port 3000)
├── Static HTML/CSS/JS
├── Served by nginx
└── Connects to local node
Key Features
Blockchain Node
- Built directly on server from source code
- Source copied from localhost via scp
- Auto-sync on startup
- No large file uploads needed
- Uses server's gigabit connection
Explorer
- Pure HTML/CSS/JS (no build step)
- Served by nginx
- Real-time block viewing
- Transaction details
- Auto-refresh every 30 seconds
Manual Deployment
If you need to deploy components separately:
Blockchain Node Only
ssh ns3-root
cd /opt
./deploy-blockchain-remote.sh
Explorer Only
ssh ns3-root
cd /opt
./deploy-explorer-remote.sh
Troubleshooting
Check Services
# On ns3 server
systemctl status blockchain-node blockchain-rpc nginx
# Check logs
journalctl -u blockchain-node -f
journalctl -u blockchain-rpc -f
journalctl -u nginx -f
Test RPC
# From ns3
curl http://localhost:8082/rpc/head
# From external
curl http://aitbc.keisanki.net:8082/rpc/head
Port Forwarding
If port forwarding doesn't work:
# Check iptables rules
iptables -t nat -L -n
# Re-add rules
iptables -t nat -A PREROUTING -p tcp --dport 8082 -j DNAT --to-destination 192.168.100.10:8082
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 8082 -j MASQUERADE
Configuration
Blockchain Node
Location: /opt/blockchain-node/.env
- Chain ID: ait-devnet
- RPC Port: 8082
- P2P Port: 7070
- Auto-sync: enabled
Explorer
Location: /opt/blockchain-explorer/index.html
- Served by nginx on port 3000
- Connects to localhost:8082
- No configuration needed
Security Notes
- Services run as root (simplify for dev)
- No authentication on RPC (dev only)
- Port forwarding exposes services externally
- Consider firewall rules for production
Next Steps
- Set up proper authentication
- Configure HTTPS with manually issued SSL certificates
- Add multiple peers for network resilience
- Implement proper backup procedures
- Set up monitoring and alerting