Skip to content

Commit b2d5553

Browse files
fix(genesis): align backend endpoints and production mongo image
1 parent 123137a commit b2d5553

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

GENESIS_LAUNCH_GUIDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ sudo ufw allow 8000,8080,9090,3000,9093/tcp
381381
**Solutions:**
382382
```bash
383383
# Check data distribution
384-
curl http://localhost:8000/api/metrics | jq '.heterogeneity'
384+
curl http://localhost:8000/convergence | jq '{current_round, current_accuracy, current_loss}'
385385

386386
# Increase training iterations
387387
# Edit docker-compose.yml:
@@ -405,7 +405,7 @@ docker compose -f docker-compose.production.yml restart node-agent
405405
./tpm-bootstrap.sh
406406

407407
# Check certificate validity
408-
curl http://localhost:8000/api/trust_status
408+
curl http://localhost:8000/health
409409

410410
# Restart TPM services
411411
docker compose -f docker-compose.production.yml restart backend

GENESIS_QUICK_START.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,26 @@ http://localhost:3000/d/consensus-trust-monitoring
6969

7070
**30 seconds after launch:**
7171
```bash
72-
# Check active nodes
73-
curl http://localhost:8000/api/network_status | jq '.active_nodes'
72+
# Check active node-agents
73+
docker ps --filter "name=node-agent" --format "{{.Names}}" | wc -l
7474
# Expected: >= 20
7575
```
7676

7777
**5 minutes after launch:**
7878
```bash
7979
# Check training rounds
80-
curl http://localhost:8000/api/metrics | jq '.round'
80+
curl http://localhost:8000/convergence | jq '.current_round'
8181
# Expected: >= 5
8282

8383
# Check accuracy
84-
curl http://localhost:8000/api/metrics | jq '.accuracy'
84+
curl http://localhost:8000/convergence | jq '.current_accuracy'
8585
# Expected: > 0.60
8686
```
8787

8888
**30 minutes after launch:**
8989
```bash
9090
# Check convergence
91-
curl http://localhost:8000/api/convergence_status | jq '.accuracy'
91+
curl http://localhost:8000/convergence | jq '.current_accuracy'
9292
# Expected: > 0.85
9393
```
9494

docker-compose.production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ services:
8686

8787
# MongoDB: Primary Data Store
8888
mongo:
89-
image: mongo:7.0-alpine
89+
image: mongo:7.0
9090
container_name: sovereignmap-mongo
9191
ports:
9292
- "127.0.0.1:27017:27017"

genesis-launch.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,15 @@ start_monitoring() {
319319
echo ""
320320

321321
# Get metrics from backend
322-
if curl -s http://localhost:8000/api/metrics > /tmp/metrics.json 2>/dev/null; then
322+
if curl -s http://localhost:8000/convergence > /tmp/metrics.json 2>/dev/null; then
323323
local accuracy
324324
local loss
325325
local round
326326
local nodes
327-
accuracy=$(jq -r '.accuracy // "N/A"' /tmp/metrics.json 2>/dev/null || echo "N/A")
328-
loss=$(jq -r '.loss // "N/A"' /tmp/metrics.json 2>/dev/null || echo "N/A")
329-
round=$(jq -r '.round // "N/A"' /tmp/metrics.json 2>/dev/null || echo "N/A")
330-
nodes=$(jq -r '.active_nodes // "N/A"' /tmp/metrics.json 2>/dev/null || echo "N/A")
327+
accuracy=$(jq -r '.current_accuracy // "N/A"' /tmp/metrics.json 2>/dev/null || echo "N/A")
328+
loss=$(jq -r '.current_loss // "N/A"' /tmp/metrics.json 2>/dev/null || echo "N/A")
329+
round=$(jq -r '.current_round // "N/A"' /tmp/metrics.json 2>/dev/null || echo "N/A")
330+
nodes=$(docker ps --filter "name=node-agent" --format "{{.Names}}" | wc -l)
331331

332332
echo -e " ${CYAN}Round:${NC} $round"
333333
echo -e " ${CYAN}Accuracy:${NC} $accuracy"

validate-genesis-launch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ validate_repository_files() {
109109
# Essential scripts
110110
FILES=(
111111
"genesis-launch.sh"
112-
"docker-compose.yml"
112+
"docker-compose.production.yml"
113113
"docker-compose.monitoring.yml"
114114
"prometheus.yml"
115115
"alertmanager.yml"
@@ -136,7 +136,7 @@ validate_docker_configs() {
136136

137137
# Validate docker-compose files
138138
COMPOSE_FILES=(
139-
"docker-compose.yml"
139+
"docker-compose.production.yml"
140140
"docker-compose.monitoring.yml"
141141
)
142142

0 commit comments

Comments
 (0)