Dobromir Popov
1da088926a
Merge branch 'master' of https://git.d-popov.com/popov/neuron-tai
2026-06-30 17:27:12 +03:00
Dobromir Popov
df473ef278
fix LAN discovery/connection
2026-06-30 16:16:20 +02:00
Dobromir Popov
9ca198ee1e
Add relay-backed public node registration
2026-06-30 15:01:49 +02:00
Dobromir Popov
d9110b623b
feat(us-025): model usage statistics with rolling RPM windows and SQLite persistence
...
Adds _RollingCounter and _StatsCollector to the tracker: three rolling windows
(hour=60×1min, day=24×1hr, month=30×1day) track request RPMs per model.
GET /v1/stats returns combined local + peer stats. POST /v1/stats/gossip lets
trackers push their local slice for additive merge in hive mode.
SQLite persistence via --stats-db flag; stats survive tracker restarts.
Records a stat for each proxied /v1/chat/completions request.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-30 13:37:33 +03:00
Dobromir Popov
748d535c46
feat(us-019): distributed tracker consensus — Raft assignments + CRDT gossip
...
raft.py: minimal Raft consensus for shard-assignment log
- Leader election with random 150–300ms election timeouts
- AppendEntries log replication; majority commit required
- RequestVote RPC with log-completeness check
- Follower registration forwarded to leader via HTTP proxy
gossip.py: LWW CRDT gossip for inference-node heartbeat liveness
- Each tracker keeps {node_id → wall_clock_timestamp}
- Merges incoming gossip by taking max per key
- Pushes snapshot to random peer every 3 seconds
server.py + cli.py:
- TrackerServer gains cluster_peers + cluster_self_url params
- New HTTP endpoints: /v1/raft/vote, /v1/raft/append,
/v1/raft/status, /v1/gossip
- --cluster-peers and --self-url CLI flags
tests/test_tracker_consensus.py: 6 integration tests
- Leader elected within 1s
- Follower registration propagated to all nodes
- Follower proxy to leader
- Leader kill → new election within 5s, registrations continue
- Gossip table updated on heartbeat
92 tests pass, 1 skipped.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-30 09:05:21 +03:00
Dobromir Popov
15897d5c95
feat: add tracker registration routing
2026-06-29 01:16:48 +03:00
Dobromir Popov
1141b51286
feat: scaffold meshnet monorepo
2026-06-29 00:28:29 +03:00