feat: add multi-chain support to blockchain explorer and update infrastructure configuration
- Add multi-chain support with ait-devnet, ait-testnet, ait-mainnet - Add chain selector dropdown in explorer UI - Add /api/chains endpoint to list supported chains - Update all API endpoints to accept optional chain_id parameter - Update RPC URL configuration to support multiple chains per network - Change default port from 3001 to 8016 (enhanced services range) - Update coordinator database path to ./
This commit is contained in:
118
GIFT_CERTIFICATE_newuser.md
Normal file
118
GIFT_CERTIFICATE_newuser.md
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
🎉🎂🎁 AITBC NETWORK GIFT CERTIFICATE 🎁🎂🎉
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
🌟 OFFICIAL GIFT TRANSACTION 🌟
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
👤 RECIPIENT: newuser
|
||||||
|
🏠 LOCATION: aitbc Server
|
||||||
|
📱 WALLET: aitbc1newuser_simple
|
||||||
|
💰 AMOUNT: 1,000 AITBC Coins
|
||||||
|
🎁 TYPE: Welcome Gift
|
||||||
|
📅 DATE: March 7, 2026
|
||||||
|
⏰ TIME: 11:35 UTC
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
🔗 TRANSACTION DETAILS:
|
||||||
|
┌─────────────────────────────────────────────────────────────┐
|
||||||
|
│ Transaction ID: │
|
||||||
|
│ 0xc59be4528dbbfd1b4aaefa7ff807f72467e6b8d39857bc96a0edef3d307d780d │
|
||||||
|
│ │
|
||||||
|
│ From: aitbc1genesis (localhost at1) │
|
||||||
|
│ To: aitbc1newuser_simple (aitbc server) │
|
||||||
|
│ Amount: 1,000.000000 AITBC │
|
||||||
|
│ Status: ✅ CONFIRMED │
|
||||||
|
│ Network: AITBC Enhanced Development Network │
|
||||||
|
└─────────────────────────────────────────────────────────────┘
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
🎊 CONGRATULATIONS! 🎊
|
||||||
|
|
||||||
|
You have received 1,000 AITBC coins as a welcome gift to join
|
||||||
|
the AITBC Enhanced Development Network!
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
🚀 WHAT YOU CAN DO WITH YOUR AITBC COINS:
|
||||||
|
|
||||||
|
🤖 AI TRADING ENGINE
|
||||||
|
• Start automated trading strategies
|
||||||
|
• Use predictive analytics
|
||||||
|
• Portfolio optimization
|
||||||
|
|
||||||
|
🔍 AI SURVEILLANCE
|
||||||
|
• Behavioral analysis monitoring
|
||||||
|
• Risk assessment tools
|
||||||
|
• Market integrity protection
|
||||||
|
|
||||||
|
📊 ADVANCED ANALYTICS
|
||||||
|
• Real-time market insights
|
||||||
|
• Performance metrics
|
||||||
|
• Custom analytics reports
|
||||||
|
|
||||||
|
🏢 ENTERPRISE INTEGRATION
|
||||||
|
• Multi-tenant API access
|
||||||
|
• Enterprise security features
|
||||||
|
• Compliance automation
|
||||||
|
|
||||||
|
⛓️ CROSS-CHAIN OPERATIONS
|
||||||
|
• Asset transfers between chains
|
||||||
|
• Atomic swap capabilities
|
||||||
|
• Bridge operations
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
📱 QUICK START GUIDE:
|
||||||
|
|
||||||
|
1. Check your balance:
|
||||||
|
curl http://aitbc-cascade:8000/wallet/balance
|
||||||
|
|
||||||
|
2. Explore AI features:
|
||||||
|
aitbc ai-trading --help
|
||||||
|
aitbc ai-surveillance --help
|
||||||
|
aitbc advanced-analytics --help
|
||||||
|
|
||||||
|
3. Start trading:
|
||||||
|
aitbc ai-trading start --strategy mean_reversion
|
||||||
|
|
||||||
|
4. Monitor your portfolio:
|
||||||
|
aitbc advanced-analytics dashboard
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
🌐 NETWORK INFORMATION:
|
||||||
|
|
||||||
|
🔗 Blockchain Explorer: http://aitbc-cascade:8016
|
||||||
|
📡 Coordinator API: http://aitbc-cascade:8000
|
||||||
|
⛓️ Blockchain Node: http://aitbc-cascade:8005
|
||||||
|
📚 Documentation: http://aitbc-cascade:8000/docs
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
💬 MESSAGE FROM THE SENDER:
|
||||||
|
|
||||||
|
"Welcome to the AITBC Enhanced Development Network!
|
||||||
|
We're excited to have you join our community of AI-powered
|
||||||
|
trading and analytics enthusiasts. Your 1,000 AITBC gift
|
||||||
|
is your starting point to explore all the amazing features
|
||||||
|
our network has to offer.
|
||||||
|
|
||||||
|
Happy trading and welcome aboard! 🚀"
|
||||||
|
|
||||||
|
- The AITBC Team (localhost at1)
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
🔐 SECURITY NOTE:
|
||||||
|
This gift certificate is for verification purposes only.
|
||||||
|
Your actual AITBC coins are securely stored in your wallet
|
||||||
|
at: aitbc1newuser_simple on the aitbc server.
|
||||||
|
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
|
🎉 ENJOY YOUR AITBC COINS! 🎉
|
||||||
|
═══════════════════════════════════════════════════════════════
|
||||||
@@ -5,7 +5,7 @@ from sqlalchemy import StaticPool
|
|||||||
|
|
||||||
# Create in-memory SQLite database for now
|
# Create in-memory SQLite database for now
|
||||||
engine = create_engine(
|
engine = create_engine(
|
||||||
"sqlite:////home/oib/windsurf/aitbc/apps/coordinator-api/aitbc_coordinator.db",
|
"sqlite:///./data/coordinator.db",
|
||||||
connect_args={"check_same_thread": False},
|
connect_args={"check_same_thread": False},
|
||||||
poolclass=StaticPool,
|
poolclass=StaticPool,
|
||||||
echo=True # Enable SQL logging for debugging
|
echo=True # Enable SQL logging for debugging
|
||||||
@@ -15,3 +15,7 @@ engine = create_engine(
|
|||||||
def create_db_and_tables():
|
def create_db_and_tables():
|
||||||
"""Create database and tables"""
|
"""Create database and tables"""
|
||||||
SQLModel.metadata.create_all(engine)
|
SQLModel.metadata.create_all(engine)
|
||||||
|
|
||||||
|
async def init_db():
|
||||||
|
"""Initialize database by creating tables"""
|
||||||
|
create_db_and_tables()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# AITBC Infrastructure Documentation
|
# AITBC Infrastructure Documentation
|
||||||
|
|
||||||
> Last updated: 2026-03-05 (Updated for port logic 8000+, Concrete ML compatibility issue documented)
|
> Last updated: 2026-03-10 (Updated nginx configuration with new port logic implementation)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -27,19 +27,19 @@ Internet → aitbc.bubuit.net (HTTPS :443)
|
|||||||
│ │ │ │
|
│ │ │ │
|
||||||
│ │ Nginx (:80) → routes to services: │ │
|
│ │ Nginx (:80) → routes to services: │ │
|
||||||
│ │ / → static website │ │
|
│ │ / → static website │ │
|
||||||
│ │ /explorer/ → Vite SPA │ │
|
|
||||||
│ │ /marketplace/ → Vite SPA │ │
|
|
||||||
│ │ /api/ → :8000 (coordinator)│ │
|
│ │ /api/ → :8000 (coordinator)│ │
|
||||||
│ │ /api/exchange/ → :8001 (exchange) │ │
|
│ │ /exchange/ → :8001 (exchange) │ │
|
||||||
│ │ /rpc/ → :8003 (blockchain) │ │
|
│ │ /rpc/ → :8006 (blockchain) │ │
|
||||||
│ │ /app/ → :8016 (web ui) │ │
|
│ │ /wallet/ → :8000 (wallet) │ │
|
||||||
│ │ /api/gpu/ → :8010 (multimodal) │ │
|
│ │ /health → :8000 (health) │ │
|
||||||
│ │ /api/gpu-multimodal/ → :8011 │ │
|
│ │ /gpu/multimodal/ → :8010 │ │
|
||||||
│ │ /api/optimization/ → :8012 │ │
|
│ │ /gpu/service/ → :8011 │ │
|
||||||
│ │ /api/learning/ → :8013 │ │
|
│ │ /optimization/ → :8012 │ │
|
||||||
│ │ /api/marketplace-enhanced/ → :8014 │ │
|
│ │ /learning/ → :8013 │ │
|
||||||
│ │ /api/openclaw/ → :8015 │ │
|
│ │ /marketplace/enhanced/ → :8014 │ │
|
||||||
│ │ /health → 200 OK │ │
|
│ │ /openclaw/ → :8015 │ │
|
||||||
|
│ │ /explorer/ → :8016 │ │
|
||||||
|
│ │ /balancer/ → :8017 │ │
|
||||||
│ │ │ │
|
│ │ │ │
|
||||||
│ │ Config: /etc/nginx/sites-enabled/ │ │
|
│ │ Config: /etc/nginx/sites-enabled/ │ │
|
||||||
│ │ aitbc.bubuit.net │ │
|
│ │ aitbc.bubuit.net │ │
|
||||||
@@ -47,7 +47,7 @@ Internet → aitbc.bubuit.net (HTTPS :443)
|
|||||||
└──────────────────────────────────────────────┘
|
└──────────────────────────────────────────────┘
|
||||||
```
|
```
|
||||||
|
|
||||||
## Port Logic Implementation (Updated March 7, 2026)
|
## Port Logic Implementation (Updated March 10, 2026)
|
||||||
|
|
||||||
### **Core Services (8000-8001) - AT1 STANDARD REFERENCE**
|
### **Core Services (8000-8001) - AT1 STANDARD REFERENCE**
|
||||||
- **Port 8000**: Coordinator API ✅ PRODUCTION READY
|
- **Port 8000**: Coordinator API ✅ PRODUCTION READY
|
||||||
@@ -390,72 +390,41 @@ curl -s https://aitbc.bubuit.net/api/v1/health # External API access
|
|||||||
|
|
||||||
### Nginx Routes (container)
|
### Nginx Routes (container)
|
||||||
|
|
||||||
Config: `/etc/nginx/sites-enabled/aitbc.bubuit.net`
|
Config: `/etc/nginx/sites-enabled/aitbc`
|
||||||
|
|
||||||
| Route | Target | Type | Status |
|
| Route | Target | Type | Status |
|
||||||
|-------|--------|------|--------|
|
|-------|--------|------|--------|
|
||||||
| `/` | static files (`/var/www/aitbc.bubuit.net/`) | try_files | ✅ |
|
| `/` | static files (`/var/www/html/`) | try_files | ✅ |
|
||||||
| `/explorer/` | Vite SPA (`/var/www/aitbc.bubuit.net/explorer/`) | try_files | ✅ |
|
| `/api/` | proxy → `127.0.0.1:8000/v1/` | proxy_pass | ✅ |
|
||||||
| `/marketplace/` | Vite SPA (`/var/www/aitbc.bubuit.net/marketplace/`) | try_files | ✅ |
|
| `/exchange/` | proxy → `127.0.0.1:8001/` | proxy_pass | ✅ |
|
||||||
| `/docs/` | static HTML (`/var/www/aitbc.bubuit.net/docs/`) | alias | ✅ |
|
| `/rpc/` | proxy → `127.0.0.1:8006/rpc/` | proxy_pass | ✅ |
|
||||||
| `/api/` | proxy → `127.0.0.1:8000/` | proxy_pass | ✅ |
|
| `/wallet/` | proxy → `127.0.0.1:8000/wallet/` | proxy_pass | ✅ |
|
||||||
| `/api/explorer/` | proxy → `127.0.0.1:8000/v1/explorer/` | proxy_pass | ✅ |
|
| `/health` | proxy → `127.0.0.1:8000/v1/health` | proxy_pass | ✅ |
|
||||||
| `/api/users/` | proxy → `127.0.0.1:8000/v1/users/` | proxy_pass | ✅ |
|
| `/gpu/multimodal/` | proxy → `127.0.0.1:8010/` | proxy_pass | ✅ (CPU-only) |
|
||||||
| `/api/exchange/` | proxy → `127.0.0.1:8001/` | proxy_pass | ✅ |
|
| `/gpu/service/` | proxy → `127.0.0.1:8011/` | proxy_pass | ✅ (CPU-only) |
|
||||||
| `/api/trades/recent` | proxy → `127.0.0.1:8001/trades/recent` | proxy_pass | ✅ |
|
| `/optimization/` | proxy → `127.0.0.1:8012/` | proxy_pass | ✅ |
|
||||||
| `/api/orders/orderbook` | proxy → `127.0.0.1:8001/orders/orderbook` | proxy_pass | ✅ |
|
| `/learning/` | proxy → `127.0.0.1:8013/` | proxy_pass | ✅ |
|
||||||
| `/admin/` | proxy → `127.0.0.1:8000/v1/admin/` | proxy_pass | ✅ |
|
| `/marketplace/enhanced/` | proxy → `127.0.0.1:8014/` | proxy_pass | ✅ |
|
||||||
| `/rpc/` | proxy → `127.0.0.1:8003` | proxy_pass | ✅ |
|
| `/openclaw/` | proxy → `127.0.0.1:8015/` | proxy_pass | ✅ |
|
||||||
| `/app/` | proxy → `127.0.0.1:8016` | proxy_pass | ✅ |
|
| `/explorer/` | proxy → `127.0.0.1:8016/` | proxy_pass | ✅ |
|
||||||
| `/api/gpu/` | proxy → `127.0.0.1:8010` | proxy_pass | ✅ (CPU-only) |
|
| `/balancer/` | proxy → `127.0.0.1:8017/` | proxy_pass | ✅ |
|
||||||
| `/api/gpu-multimodal/` | proxy → `127.0.0.1:8011` | proxy_pass | ✅ (CPU-only) |
|
|
||||||
| `/api/optimization/` | proxy → `127.0.0.1:8012` | proxy_pass | ✅ |
|
|
||||||
| `/api/learning/` | proxy → `127.0.0.1:8013` | proxy_pass | ✅ |
|
|
||||||
| `/api/marketplace-enhanced/` | proxy → `127.0.0.1:8014` | proxy_pass | ✅ |
|
|
||||||
| `/api/openclaw/` | proxy → `127.0.0.1:8015` | proxy_pass | ✅ |
|
|
||||||
| `/api/loadbalancer/` | proxy → `127.0.0.1:8017` | proxy_pass | ✅ |
|
|
||||||
| `/health` | 200 OK | direct | ✅ |
|
|
||||||
| `/Marketplace` | 301 → `/marketplace/` | redirect (legacy) | ✅ |
|
|
||||||
| `/BrowserWallet` | 301 → `/docs/browser-wallet.html` | redirect (legacy) | ✅ |
|
|
||||||
|
|
||||||
**API Routing Updated** (2026-03-04):
|
**API Routing Updated** (2026-03-10):
|
||||||
- Updated `/api/` proxy_pass from `http://127.0.0.1:8000/v1/` to `http://127.0.0.1:8000/`
|
- Updated nginx configuration to use new port logic from infrastructure documentation
|
||||||
- Updated Exchange API routes to port 8001 (new port logic)
|
- Updated RPC route from port 8003 to port 8006 (blockchain services)
|
||||||
- Updated RPC route to port 8003 (new port logic)
|
- Updated Exchange API route to port 8001 (core services)
|
||||||
- Added Enhanced Services routes (8010-8017)
|
- Added Enhanced Services routes with correct port mappings (8010-8017)
|
||||||
- Added Web UI route to port 8016
|
- Simplified configuration for HTTP-only mode (SSL handled by host reverse proxy)
|
||||||
- Added Geographic Load Balancer route to port 8017
|
- External API access: `https://aitbc.bubuit.net/api/v1/health` → `{"status":"ok","env":"dev"}`
|
||||||
- Removed legacy routes (Exchange, wallet, mock coordinator)
|
- All GPU services configured for CPU-only mode
|
||||||
- External API access now working: `https://aitbc.bubuit.net/api/v1/health` → `{"status":"ok","env":"dev"}`
|
|
||||||
- All GPU services marked as CPU-only mode
|
|
||||||
|
|
||||||
### Web Root (`/var/www/aitbc.bubuit.net/`)
|
### Web Root (`/var/www/html/`)
|
||||||
|
|
||||||
```
|
```
|
||||||
/var/www/aitbc.bubuit.net/
|
/var/www/html/
|
||||||
├── index.html # Main website
|
├── index.html # Main website
|
||||||
├── 404.html # Error page
|
├── 404.html # Error page
|
||||||
├── favicon.ico
|
└── static files # CSS, JS, images
|
||||||
├── favicon.svg
|
|
||||||
├── font-awesome-local.css
|
|
||||||
├── docs/ # HTML documentation (16 pages + css/js)
|
|
||||||
│ ├── index.html
|
|
||||||
│ ├── clients.html
|
|
||||||
│ ├── miners.html
|
|
||||||
│ ├── developers.html
|
|
||||||
│ ├── css/docs.css
|
|
||||||
│ └── js/theme.js
|
|
||||||
├── explorer/ # Blockchain explorer (Vite build)
|
|
||||||
│ ├── index.html
|
|
||||||
│ ├── assets/
|
|
||||||
│ ├── css/
|
|
||||||
│ └── js/
|
|
||||||
├── marketplace/ # GPU marketplace (Vite build)
|
|
||||||
│ ├── index.html
|
|
||||||
│ └── assets/
|
|
||||||
├── wallet/ # Browser wallet redirect
|
|
||||||
│ └── index.html
|
|
||||||
└── firefox-wallet/ # Firefox extension download
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Data Storage (container)
|
### Data Storage (container)
|
||||||
|
|||||||
Reference in New Issue
Block a user