Commit fc25573
feat(depin): add bootstrap discovery, persistence, and live training monitor
Bootstrap node discovery (bootstrap.zig):
- Directed UDP discovery to known bootstrap nodes
- BootstrapPeer health tracking (trust score, failures, last_seen)
- Railway API discovery fallback (deferred)
- DNS seed resolver (deferred)
Cluster state persistence (persistence.zig):
- .tri-cluster.json with atomic writes (temp + rename)
- Backup rotation (.bak, .bak2)
- Peer quality scores for routing decisions
- NodeRole (coordinator/worker/storage) and NodeTier (free/staker/power/whale)
Live training monitor (train_live.zig):
- Real-time status via Railway logs API (not stale cache!)
- Detects real errors (DatasetNotFound, OOM, panic)
- Parses latest step and PPL from logs
- Action recommendations ONLY for workers with real errors
DePIN CLI (tri_depin.zig):
- `tri depin bootstrap` - bootstrap node management
- `tri depin peers` - peer discovery and health
- `tri depin cluster` - cluster state operations
Network layer (network.zig):
- UDP discovery socket with broadcast support
- Peer message protocol (ping/pong/discover/peer_list)
- GossipManager for peer propagation
Queen UI:
- ChatScreen: keyboard toolbar improvements
- CommentSidebar: minor fixes
φ² + 1/φ² = 3 = TRINITY | DePIN Phase 1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent d82be49 commit fc25573
File tree
9 files changed
+1936
-198
lines changed- apps/queen/QueenUI/Screens/Brain
- src
- depin
- tri
9 files changed
+1936
-198
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
323 | 322 | | |
324 | | - | |
325 | | - | |
| 323 | + | |
| 324 | + | |
326 | 325 | | |
327 | 326 | | |
328 | 327 | | |
| |||
350 | 349 | | |
351 | 350 | | |
352 | 351 | | |
353 | | - | |
354 | | - | |
| 352 | + | |
| 353 | + | |
355 | 354 | | |
356 | 355 | | |
357 | 356 | | |
| |||
373 | 372 | | |
374 | 373 | | |
375 | 374 | | |
376 | | - | |
377 | | - | |
| 375 | + | |
| 376 | + | |
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
| |||
1133 | 1132 | | |
1134 | 1133 | | |
1135 | 1134 | | |
1136 | | - | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1137 | 1140 | | |
1138 | 1141 | | |
1139 | 1142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| |||
Large diffs are not rendered by default.
0 commit comments