chore: update genesis timestamp, fix import paths, clean compiled JS files, and adjust mock path - Update devnet genesis timestamp to 1766400877 - Add Receipt model for zk-proof generation with receiptId, miner, coordinator fields - Fix import paths from settings to config across service modules (access_control, audit_logging, encryption, hsm_key_manager, key_management, zk_proofs) - Remove compiled JavaScript files from explorer-web components and lib directories - Update mock data base path
3.5 KiB
3.5 KiB
Pool Hub – Task Breakdown
Status (2025-12-22)
- Stage 1: ✅ IMPLEMENTED - FastAPI service implemented with miner registry, scoring engine, and Redis/PostgreSQL backing stores. Service configuration API and UI added for GPU providers to select which services to offer.
- Service Configuration: ✅ Implemented dynamic service configuration allowing miners to enable/disable specific GPU services, set pricing, and define capabilities.
Stage 1 (MVP) - COMPLETED
-
Project Setup
- ✅ Initialize FastAPI project under
apps/pool-hub/src/app/withmain.py,deps.py,registry.py,scoring.py, and router modules (miners.py,match.py,admin.py,health.py). - ✅ Add
.env.exampledefining bind host/port, DB DSN, Redis URL, coordinator shared secret, session TTLs. - ✅ Configure dependencies: FastAPI, uvicorn, pydantic-settings, SQLAlchemy/SQLModel, psycopg (or sqlite), redis, prometheus-client.
- ✅ Initialize FastAPI project under
-
Data Layer
- ✅ Implement PostgreSQL schema for miners, miner status, feedback, price overrides as outlined in bootstrap doc.
- ✅ Provide migrations or DDL scripts under
apps/pool-hub/migrations/.
-
Registry & Scoring
- ✅ Build in-memory registry (with optional Redis backing) storing miner capabilities, health, and pricing.
- ✅ Implement scoring function weighing capability fit, price, latency, trust, and load.
-
API Endpoints
- ✅
POST /v1/miners/registerexchanging API key for session token, storing capability profile. - ✅
POST /v1/miners/updateandWS /v1/miners/heartbeatfor status updates. - ✅
POST /v1/matchreturning top K candidates for coordinator requests with explain string. - ✅
POST /v1/feedbackto adjust trust and metrics. - ✅
GET /v1/healthandGET /v1/metricsfor observability. - ✅ Service Configuration endpoints:
GET /v1/services/- List all service configurations for minerGET /v1/services/{type}- Get specific service configurationPOST /v1/services/{type}- Create/update service configurationPATCH /v1/services/{type}- Partial updateDELETE /v1/services/{type}- Delete configurationGET /v1/services/templates/{type}- Get default templatesPOST /v1/services/validate/{type}- Validate against hardware
- ✅ UI endpoint:
GET /services- Service configuration web interface
- ✅ Optional admin listing endpoint guarded by shared secret.
- ✅
-
Rate Limiting & Security
- ✅ Enforce coordinator shared secret on
/v1/match. - ✅ Add rate limits to registration and match endpoints.
- ✅ Consider IP allowlist and TLS termination guidance.
- ✅ Enforce coordinator shared secret on
-
Testing & Tooling
- ✅ Unit tests for scoring module, registry updates, and feedback adjustments.
- ✅ Integration test simulating miners registering, updating, and matching.
- ✅ Provide CLI scripts to seed mock miners for development.
Implementation Status
- Location:
apps/pool-hub/src/app/ - Features: Miner registry, scoring engine, service configuration, UI
- Database: PostgreSQL with Redis backing
- API: REST endpoints with WebSocket heartbeat support
- Security: Coordinator shared secret, rate limiting
- Deployment: Ready for deployment with systemd service
Stage 2+ - IN PROGRESS
- 🔄 Introduce WebSocket streaming of match suggestions and commands.
- 🔄 Add redis-based lease management, multi-region routing, and attested capability manifests.
- 🔄 Integrate marketplace pricing data and blockchain settlement hooks.