Skip to content

Commit a25ecc8

Browse files
Finalize HUD, tokenomics dashboard fixes, and compose/profile consolidation
1 parent 88b6df9 commit a25ecc8

98 files changed

Lines changed: 1509 additions & 3475 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ NUM_ROUNDS=100
3636
# -----------------------------------------------------------------------------
3737
# Development Specific
3838
# -----------------------------------------------------------------------------
39-
# These are typically only used in the docker-compose.dev.yml
39+
# These are typically used in the docker-compose.full.yml local runtime
4040
FLASK_ENV=development
4141
FLASK_DEBUG=1
4242

4343
# -----------------------------------------------------------------------------
4444
# Production Specific
4545
# -----------------------------------------------------------------------------
46-
# These are typically only used in the docker-compose.production.yml
46+
# These are typically used in the docker-compose.full.yml secure runtime
4747
# Set to 'true' to enable TPM-based security features
4848
TPM_ENABLED=false

.github/workflows/audit-check.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,19 @@ jobs:
1515

1616
- name: SGP-001 Standards Check
1717
run: |
18-
FILE="docker-compose.200nodes.yml"
19-
20-
# 1. Check NODE_COUNT (The cluster size)
21-
NODE_COUNT=$(grep "NODE_COUNT" "$FILE" | sed 's/[^0-9]//g' | head -1)
22-
23-
# 2. Check replicas (The actual deployed agents)
24-
REPLICAS=$(grep "replicas:" "$FILE" | sed 's/[^0-9]//g' | head -1)
18+
FILE="docker-compose.full.yml"
2519
26-
echo "Audit Debug: Found $NODE_COUNT nodes and $REPLICAS replicas."
20+
if [ ! -f "$FILE" ]; then
21+
echo "❌ Missing required compose file: $FILE"
22+
exit 1
23+
fi
2724
28-
if [ "$NODE_COUNT" != "200" ] || [ "$REPLICAS" != "200" ]; then
29-
echo "❌ SGP-001 Violation: Cluster size must be 200."
25+
if ! grep -q '^ node-agent:' "$FILE"; then
26+
echo "❌ SGP-001 Violation: node-agent service missing from full compose profile."
3027
exit 1
3128
fi
32-
33-
echo "✅ Audit Verified: 200-node quorum confirmed."
29+
30+
echo "✅ Audit Verified: full compose profile contains node-agent service."
3431
3532
lint-scripts:
3633
runs-on: ubuntu-latest

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ jobs:
5757

5858
- name: Build Docker images
5959
run: |
60-
docker compose -f docker-compose.200nodes.yml build --no-cache
60+
docker compose -f docker-compose.full.yml build --no-cache
6161
6262
- name: Start services
63-
run: docker compose -f docker-compose.ci.yml up -d
63+
run: docker compose -f docker-compose.full.yml up -d --scale node-agent=5
6464

6565
- name: Wait for backend health
6666
run: |
@@ -70,7 +70,7 @@ jobs:
7070
- name: Debug on failure
7171
if: failure()
7272
run: |
73-
docker compose -f docker-compose.200nodes.yml logs
73+
docker compose -f docker-compose.full.yml logs
7474
docker ps -a
7575
7676
- name: Install Python dependencies

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Validate Docker Compose files
5353
run: |
5454
echo "Validating docker-compose files..."
55-
for file in docker-compose.full.yml docker-compose.monitoring.yml docker-compose.tpm-secure.yml docker-compose.monitoring.tpm.yml; do
55+
for file in docker-compose.full.yml; do
5656
if [ -f "$file" ]; then
5757
echo "Checking $file..."
5858
docker compose -f "$file" config > /dev/null 2>&1 && echo "✅ $file valid" || echo "⚠️ $file validation skipped (Docker not available in test env)"

.github/workflows/test-artifacts-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
paths:
77
- 'tests/scripts/bash/run-1000-node-npu-test.sh'
8-
- 'docker-compose.1000nodes.yml'
8+
- 'docker-compose.full.yml'
99
- 'tests/scripts/python/byzantine-stress-test-suite.py'
1010
- 'tests/scripts/python/generate-byzantine-test-suite-plots.py'
1111
- 'test-results/**'
@@ -14,7 +14,7 @@ on:
1414
- main
1515
paths:
1616
- 'tests/scripts/bash/run-1000-node-npu-test.sh'
17-
- 'docker-compose.1000nodes.yml'
17+
- 'docker-compose.full.yml'
1818
- 'tests/scripts/python/byzantine-stress-test-suite.py'
1919
- 'tests/scripts/python/generate-byzantine-test-suite-plots.py'
2020
- 'test-results/**'

Documentation/Deployment/DEPLOYMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ export $(cat .env | xargs)
185185
docker volume create tpm-certs
186186

187187
# Start monitoring stack (first)
188-
docker compose -f docker-compose.monitoring.tpm.yml up -d
188+
docker compose -f docker-compose.full.yml up -d
189189

190190
# Start TPM security layer
191-
docker compose -f docker-compose.tpm-secure.yml up -d
191+
docker compose -f docker-compose.full.yml up -d
192192

193193
# Start main application (last)
194194
docker compose -f docker-compose.full.yml up -d --scale node-agent=100

Documentation/Deployment/DOCKER_OPTIMIZATION.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This guide covers the optimized Docker setup for the Sovereign Map Byzantine-tol
88

99
### Development (5 nodes, 2 minutes)
1010
```bash
11-
docker compose -f docker-compose.dev.yml up -d
11+
docker compose -f docker-compose.full.yml up -d
1212
```
1313

1414
**Access:**
@@ -19,12 +19,12 @@ docker compose -f docker-compose.dev.yml up -d
1919

2020
### Production (50 nodes, 5 minutes)
2121
```bash
22-
docker compose -f docker-compose.production.yml up -d --scale node-agent=50
22+
docker compose -f docker-compose.full.yml up -d --scale node-agent=50
2323
```
2424

2525
### Large-Scale (500+ nodes, 15 minutes)
2626
```bash
27-
docker compose -f docker-compose.large-scale.yml up -d --scale node-agent=500
27+
docker compose -f docker-compose.full.yml up -d --scale node-agent=500
2828
```
2929

3030
## Architecture Overview
@@ -150,7 +150,7 @@ backend:
150150
### Local Development
151151
```bash
152152
# Use local driver (default)
153-
docker compose -f docker-compose.dev.yml up -d
153+
docker compose -f docker-compose.full.yml up -d
154154
```
155155

156156
### Production with External Storage
@@ -201,15 +201,15 @@ docker exec sovereignmap-mongo mongorestore /backups/mongo_latest
201201

202202
**Machine 1 (Backend):**
203203
```bash
204-
docker compose -f docker-compose.production.yml up -d
204+
docker compose -f docker-compose.full.yml up -d
205205
# Exposes ports 3000, 3001, 8000, 8080, 9090, 9093
206206
```
207207

208208
**Machines 2-N (Node Agents):**
209209
```bash
210210
# Point to backend machine (IP: 192.168.1.100)
211211
BACKEND_URL=http://192.168.1.100:8000 \
212-
docker compose -f docker-compose.production.yml up -d node-agent
212+
docker compose -f docker-compose.full.yml up -d node-agent
213213
```
214214

215215
## Logging
@@ -365,10 +365,10 @@ docker logs sovereignmap-backend | grep -i "error\|failed"
365365
### Add Nodes During Deployment
366366
```bash
367367
# Scale to 100 nodes
368-
docker compose -f docker-compose.production.yml up -d --scale node-agent=100
368+
docker compose -f docker-compose.full.yml up -d --scale node-agent=100
369369

370370
# Add 50 more nodes
371-
docker compose -f docker-compose.production.yml up -d --scale node-agent=150
371+
docker compose -f docker-compose.full.yml up -d --scale node-agent=150
372372
```
373373

374374
### Monitor Scaling
@@ -385,13 +385,13 @@ docker stats --no-stream
385385
### Stop Services
386386
```bash
387387
# Stop dev environment
388-
docker compose -f docker-compose.dev.yml down
388+
docker compose -f docker-compose.full.yml down
389389

390390
# Stop but keep volumes
391-
docker compose -f docker-compose.dev.yml down --volumes
391+
docker compose -f docker-compose.full.yml down --volumes
392392

393393
# Remove everything
394-
docker compose -f docker-compose.dev.yml down -v --remove-orphans
394+
docker compose -f docker-compose.full.yml down -v --remove-orphans
395395
```
396396

397397
### Prune Resources
@@ -400,7 +400,7 @@ docker compose -f docker-compose.dev.yml down -v --remove-orphans
400400
docker system prune -a
401401

402402
# Remove all Sovereign Map resources
403-
docker compose -f docker-compose.production.yml down -v
403+
docker compose -f docker-compose.full.yml down -v
404404
```
405405

406406
## CI/CD Integration

Documentation/Deployment/DOCKER_OPTIMIZATION_SUMMARY.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ COPY --from=build /app/dist /usr/share/nginx/html
6161

6262
### 2. Docker Compose Files
6363

64-
#### `docker-compose.dev.yml` (Development)
64+
#### `docker-compose.full.yml` (Development)
6565
**For rapid iteration with hot reload:**
6666
- 5 node agents (reduced scale)
6767
- Bind mounts for source code hot reload
@@ -71,11 +71,11 @@ COPY --from=build /app/dist /usr/share/nginx/html
7171
- Use case: Local development (2 min setup)
7272

7373
```bash
74-
docker compose -f docker-compose.dev.yml up -d
74+
docker compose -f docker-compose.full.yml up -d
7575
# Access: Frontend http://localhost:3000 | Backend http://localhost:8000
7676
```
7777

78-
#### `docker-compose.production.yml` (Staging/QA)
78+
#### `docker-compose.full.yml` (Staging/QA)
7979
**Production-grade with monitoring stack:**
8080
- 50 node agents (default, scalable)
8181
- Resource limits and reservations
@@ -86,11 +86,11 @@ docker compose -f docker-compose.dev.yml up -d
8686
- Use case: Staging and QA environments (5 min setup)
8787

8888
```bash
89-
docker compose -f docker-compose.production.yml up -d --scale node-agent=50
89+
docker compose -f docker-compose.full.yml up -d --scale node-agent=50
9090
# Scales to 100 nodes: --scale node-agent=100
9191
```
9292

93-
#### `docker-compose.large-scale.yml` (Production Testnet)
93+
#### `docker-compose.full.yml` (Production Testnet)
9494
**Optimized for 500-10,000+ nodes:**
9595
- MongoDB with replication set and cache optimization
9696
- Redis with memory management policies
@@ -101,7 +101,7 @@ docker compose -f docker-compose.production.yml up -d --scale node-agent=50
101101
- Use case: Production testnet deployments (15 min setup)
102102

103103
```bash
104-
docker compose -f docker-compose.large-scale.yml up -d --scale node-agent=500
104+
docker compose -f docker-compose.full.yml up -d --scale node-agent=500
105105
# Monitor: watch -n 5 'curl http://localhost:8000/convergence | jq'
106106
```
107107

@@ -174,7 +174,7 @@ docker compose -f docker-compose.large-scale.yml up -d --scale node-agent=500
174174

175175
### 1. Development (2 minutes, 1GB RAM)
176176
```bash
177-
docker compose -f docker-compose.dev.yml up -d
177+
docker compose -f docker-compose.full.yml up -d
178178

179179
# Access
180180
open http://localhost:3000 # Frontend
@@ -184,18 +184,18 @@ open http://localhost:3001 # Grafana (admin/dev)
184184

185185
### 2. Production (5 minutes, 4-6GB RAM)
186186
```bash
187-
docker compose -f docker-compose.production.yml up -d --scale node-agent=50
187+
docker compose -f docker-compose.full.yml up -d --scale node-agent=50
188188

189189
# Scale to 100 nodes
190-
docker compose -f docker-compose.production.yml up -d --scale node-agent=100
190+
docker compose -f docker-compose.full.yml up -d --scale node-agent=100
191191

192192
# Monitor
193193
watch -n 5 'curl -s http://localhost:8000/convergence | jq'
194194
```
195195

196196
### 3. Large-Scale (15 minutes, 8-16GB+ RAM)
197197
```bash
198-
docker compose -f docker-compose.large-scale.yml up -d --scale node-agent=500
198+
docker compose -f docker-compose.full.yml up -d --scale node-agent=500
199199

200200
# Monitor convergence
201201
docker exec sovereignmap-backend curl http://localhost:8000/convergence | jq
@@ -290,7 +290,7 @@ GRAFANA_PASSWORD=your_secure_password
290290

291291
### Load with Docker Compose:
292292
```bash
293-
docker compose --env-file .env -f docker-compose.production.yml up -d
293+
docker compose --env-file .env -f docker-compose.full.yml up -d
294294
```
295295

296296
---
@@ -346,7 +346,7 @@ Key sections:
346346

347347
1. **Start development environment:**
348348
```bash
349-
docker compose -f docker-compose.dev.yml up -d
349+
docker compose -f docker-compose.full.yml up -d
350350
```
351351

352352
2. **Access dashboards:**
@@ -356,7 +356,7 @@ Key sections:
356356

357357
3. **Scale up for production:**
358358
```bash
359-
docker compose -f docker-compose.production.yml up -d --scale node-agent=100
359+
docker compose -f docker-compose.full.yml up -d --scale node-agent=100
360360
```
361361

362362
4. **Monitor convergence:**
@@ -376,9 +376,9 @@ Key sections:
376376
| `Dockerfile.backend.optimized` | Dockerfile | 1.8KB | Multi-stage Python backend |
377377
| `Dockerfile.frontend.optimized` | Dockerfile | 1.1KB | Three-stage Node/nginx frontend |
378378
| `.dockerignore` | Config | 1.1KB | Build context exclusion |
379-
| `docker-compose.dev.yml` | Compose | 4.5KB | Development with hot reload |
380-
| `docker-compose.production.yml` | Compose | 7.7KB | Production with monitoring |
381-
| `docker-compose.large-scale.yml` | Compose | 6.7KB | Large-scale (500+ nodes) |
379+
| `docker-compose.full.yml` | Compose | 4.5KB | Development with hot reload |
380+
| `docker-compose.full.yml` | Compose | 7.7KB | Production with monitoring |
381+
| `docker-compose.full.yml` | Compose | 6.7KB | Large-scale (500+ nodes) |
382382
| `DOCKER_OPTIMIZATION.md` | Documentation | 9.6KB | Complete setup & troubleshooting guide |
383383
| `validate-docker.sh` | Script | 3.4KB | Validation script |
384384

Documentation/Deployment/GENESIS_LAUNCH_CHECKLIST.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
2. Review dashboards for anomalies
306306
3. Consult troubleshooting guide: [GENESIS_LAUNCH_GUIDE.md](/Documentation/Deployment/GENESIS_LAUNCH_GUIDE.md)
307307
4. Contact technical team if unresolved
308-
5. Emergency shutdown if critical: `docker compose -f docker-compose.production.yml down --remove-orphans`
308+
5. Emergency shutdown if critical: `docker compose -f docker-compose.full.yml down --remove-orphans`
309309

310310
---
311311

0 commit comments

Comments
 (0)