12 Commits
Author SHA1 Message Date
0raclus 1672858674 feat: prove a rented GPU runs a real model (Llama 3.2 on Apple Metal via DanteGPU dispatch)
Adds the "real model on a rented GPU" proof the rental-proof was building toward.

scripts/gpu-model-proof.sh — one command:
  - ensures mlx-lm in a throwaway venv (Apple Silicon / Metal),
  - starts a JetStream nats-server + the provider-daemon,
  - dispatches an ai-inference task over NATS whose payload (scripts/gpu_infer.py)
    loads a real 4-bit quantized LLM and generates text on the GPU,
  - prints the daemon-captured model output and tears everything down.

Verified on an Apple M4 Max: the daemon receives the task over NATS, runs
mlx-community/Llama-3.2-1B-Instruct-4bit on the Metal GPU (device "Device(gpu, 0)",
~235 tokens/sec, 0.81 GB GPU peak), and returns a real coherent answer with
exitCode 0. So the full chain is real end to end: detect GPU -> rent -> dispatch
over NATS -> daemon executes -> real model runs on the GPU -> output returned.

scripts/gpu_infer.py is the MLX inference payload (swap --model for any
mlx-community repo; a PyTorch payload works for CUDA/NVIDIA). docs/PROOF.md and
the README document the run; the only thing still unproven is *distributed*
multi-node inference (one model sharded across many rented GPUs).
2026-06-22 20:49:21 +03:00
0raclus 20f46e5273 feat: end-to-end live rental proof (DB persistence + NATS dispatch) + 2 bug fixes
Extends the rental-proof into a full, reproducible end-to-end demonstration that
the rental flow works with real code on real infrastructure, and fixes the two
genuine bugs the exercise surfaced.

scripts/rental-proof.sh — one command, self-contained:
  [1] detect    real GPU via provider-daemon --get-gpus-json
  [2] databases throwaway Postgres + the dante DBs (fixed init script)
  [3] persist   real detection + pricing + a metered session written to and read
                back from Postgres via the live billing store (independently
                re-queried via SQL in the script output)
  [4] dispatch  JetStream-enabled nats-server + the daemon; a task is published
                over NATS, the daemon receives and EXECUTES it (exitCode 0,
                stdout "hello-from-dantegpu") and reports status back
  Spins up throwaway Postgres + NATS (never touches yours) and tears them down.
  No Docker / NVIDIA required.

rental-proof harness gains --dsn: persists a real RentalSession (schema init,
wallet, session, usage record, settlement, read-back) through the live
PostgresStore and folds the DB-confirmed cost into the SHA-256 receipt.

Bug fixes the proof flushed out:
- provider-daemon NATS dispatch was fully broken: the default subject pattern
  `dante.tasks.dispatch.>` had the wrong stream prefix and no %s for the
  instance id, so fmt.Sprintf produced a garbage subject and no JetStream stream
  matched. Fixed to `tasks.dispatch.%s.*` (captured by the TASKS stream); the
  daemon now subscribes and runs dispatched tasks.
- (Apple VRAM=0 detection fix shipped in the prior commit.)

Docs: docs/PROOF.md walks the run + independent hash verification; README links
it; the console provider onboarding tells providers to verify detection with
`--get-gpus-json`.
2026-06-22 20:37:48 +03:00
0raclus eddd5b6e78 chore: remove legacy frontends, route everything through clients/console
The rebuilt clients/console supersedes the three legacy clients, which together
carried ~93 of the repo's Dependabot alerts. Removed:

- clients/gpu-rental-frontend (legacy renter SPA, ~21 alerts)
- clients/provider-gui (legacy Tauri desktop, ~48 alerts incl. Cargo)
- clients/provider-web-app (marketing/landing demo, ~24 alerts)
- cmd/terminal-streaming (standalone tool that only served provider-web-app's
  static files; unreferenced)

Repointed every reference to the console:
- Containerized the console: added clients/console/Dockerfile (node build ->
  nginx) + nginx.conf (SPA fallback); all three docker-compose files now build
  ./clients/console for the `frontend` service.
- CI: test-frontend matrix -> clients/console, Node 18 -> 22.
- Scripts: run-real-system.sh, deploy-enhanced-platform.sh, run-all-tests.sh,
  deploy-staging.sh, deploy-production.sh.
- k8s ingress -> console-service.
- Docs: README (architecture, ports, layout, and corrected the now-shipped
  VRAM/power matching, USDC metering and on-chain settlement status), ROADMAP,
  CONTRIBUTING, docs/STATUS; provider-daemon CLI-response comments no longer
  reference the deleted provider-gui.

Net: 105 files, ~50k lines removed; console builds clean (tsc + vite); the four
deleted modules' lockfiles (and their Dependabot alerts) are gone.
2026-06-22 16:33:53 +03:00
0raclus 443c05fbf7 fix: postgres init script could not create per-service databases (#3)
The docker-compose stack provisions one Postgres instance with a database per
service (dante_auth, dante_billing, dante_registry, dante_scheduler,
dante_storage). The init script created these via a PL/pgSQL function that ran
`EXECUTE 'CREATE DATABASE ...'`, but PostgreSQL forbids CREATE DATABASE inside a
function or transaction block. dante_auth already exists (POSTGRES_DB) so it was
skipped, but the first real creation (dante_billing) raised:

  ERROR: CREATE DATABASE cannot be executed from a function

leaving billing/registry/scheduler/storage uncreated. Their services then failed
to connect ("failed to connect user=dante_user"), exactly as reported in #3.

Rewrote the script to use the canonical psql \gexec pattern, which runs each
generated CREATE DATABASE outside any transaction, guarded by NOT EXISTS for
idempotency, plus an ALTER DATABASE OWNER pass for pre-existing databases.

Verified against a throwaway PostgreSQL 15 cluster: the old script errors on
dante_billing and leaves only dante_auth; the new script creates all five
databases and completes cleanly.
2026-06-22 16:17:30 +03:00
0raclus e0322ef180 chore: delete aspirational docs and dead stub folders, tidy docs
- Remove docs/archive/ entirely (11 progress reports + legacy dev guide).
- Remove three self-congratulatory docs (SECURITY_AUDIT_REPORT marked "PASSED /
  Production Ready" despite 186 dependency vulns, PERFORMANCE_OPTIMIZATION_REPORT,
  CODE_REVIEW_CHECKLIST), all carrying a leftover joke line.
- Strip the same joke line from kept files (API doc, runbook, start scripts).
- Delete dead stub folders: src/ (orphan Rust fragment), user-dashboard/ (empty
  API-client stub, no UI), mobile-app/ (1 of 6 screens, would not build).
- Repoint k8s ingress from the deleted user-dashboard stub to the real frontend.
- Add docs/README.md index; update README/ROADMAP/STATUS to match.

Docs now: README/ROADMAP/CONTRIBUTING at root, five core docs under docs/,
service-specific READMEs co-located with their services.
2026-06-21 04:28:24 +03:00
virjiλ e9f39c456f * 2026-02-18 05:23:34 +03:00
virjiλ beede8e172 testing 2025-10-06 18:40:46 +03:00
virjiλ 028f24a354 145 2025-10-06 18:15:47 +03:00
virjiλ 9b7ebbeb8f Database & Migrations 2025-10-06 16:28:29 +03:00
0raclus ab8edf93fc hello kubernetes 2025-08-01 15:35:11 +03:00
virjilakrum c2c1393a6a fix provider-registery and auth services 2025-06-03 16:24:02 +03:00
virjilakrum 9cc9aafa42 register service 2025-06-03 00:24:15 +03:00