A verifiable Quality-on-Demand (QoD) proof service that produces cryptographically signed telemetry artifacts and allows independent verification using public keys published via JWKS.
The system demonstrates how network or service performance claims can be tamper-evident and externally verifiable.
ARCHITECTURE DIAGRAM
flowchart TD
Client["Client / Test Harness"]
Intent["POST /intent"]
Telemetry["POST /telemetry"]
Finalize["POST /proof/{sid}/finalize"]
API["QoD API (FastAPI)"]
Ledger["SQLite Ledger<br/>sessions / telemetry / proof_ledger"]
Artifacts["Artifacts Directory<br/>artifact.json<br/>artifact_v1.json"]
JWKS["JWKS Endpoint<br/>/.well-known/jwks.json"]
Verifier["External Verifier<br/>scripts/verify_proof.py"]
Client --> Intent
Client --> Telemetry
Client --> Finalize
Intent --> API
Telemetry --> API
Finalize --> API
API --> Ledger
API --> Artifacts
Artifacts --> Verifier
Ledger --> Verifier
JWKS --> Verifier
This repository is a Quality-on-Demand (QoD) proof service + verification harness.
It simulates a telecom QoD workflow and produces tamper-evident proof records that can be verified independently.
The system allows a client to:
- Request network performance targets
- Submit telemetry measurements
- Produce a signed proof record
- Generate a runtime artifact
- Verify the proof using public keys
The design goal is independent verification.
Any third party can validate a QoD result using:
• the proof record
• the runtime artifact
• the public key set (JWKS)
Start the API:
python -m uvicorn backend.main:app --reload --port 8000
Example flow:
intent ↓ telemetry ↓ finalize proof ↓ artifact + signature ↓ verification
Client / Test Harness │ │ POST /intent │ POST /telemetry │ POST /proof/{sid}/finalize ▼ QoD API (FastAPI) │ │ writes │ │ SQLite rows │ sessions │ telemetry │ proof_ledger │ │ JSON artifacts │ artifacts/{sid}/artifact.json │ artifacts/{sid}/artifact_v1.json │ artifacts/proof_{sid}_timestamp.json ▼ Artifacts + Ledger │ │ verification checks │ │ runtime artifact hash │ ledger hash chain │ ed25519 signature │ JWKS key discovery ▼ External Verifier scripts/verify_proof.py
POST /intent
Creates a new QoD session.
Example response:
{ "session_id": "uuid", "qos_profile": "QOS_BALANCED", "qos_status": "REQUESTED" }
POST /telemetry
Stores measurement samples.
POST /proof/{session_id}/finalize
Produces:
• signed proof record
• runtime artifact
• ledger entry
GET /proof/{session_id}
Returns the stored proof record.
GET /proof/{session_id}/verify
Server-side verification that checks:
• runtime artifact hash
• ledger hash chain
• Ed25519 signature
• key lookup
Example response:
{ "verified": true, "signature_verified": true, "ledger_hash_verified": true, "runtime_artifact_verified": true }
GET /proof/{session_id}/bundle
Returns everything needed to independently verify a proof.
{ "ledger": {...}, "proof": {...}, "runtime_artifact": {...} }
This endpoint allows a verifier to validate a proof without making additional API calls.
The service exposes verification keys using JWKS.
GET /.well-known/jwks.json
Example:
{ "keys":[ { "kty":"OKP", "crv":"Ed25519", "alg":"EdDSA", "kid":"default", "x":"base64url_public_key" } ] }
External systems can retrieve the key and verify signatures.
Each proof includes multiple layers of verification.
The proof stores:
runtime_artifact_sha256
The verifier recomputes the hash of:
artifacts/{sid}/artifact.json
Each ledger record includes:
prev_hash this_hash
this_hash = sha256(prev_hash + "|" + canonical_json(proof))
This creates a chain of proofs.
The service signs:
this_hash
Stored fields:
signature kid
Verification uses the JWKS public key.
When a proof is finalized the system produces:
artifacts/{sid}/artifact.json
Runtime contract artifact.
artifacts/{sid}/artifact_v1.json
Wrapper artifact.
artifacts/proof_{sid}_timestamp.json
Proof snapshot.
artifacts/run_summaries/run_timestamp_sid.json
Run summary metadata.
The repository includes a local verification tool.
Run:
python scripts/verify_proof.py http://localhost:8000 <session_id>
Expected output:
SIGNATURE VALID kid: default verification successful
Network providers often claim performance characteristics but cannot prove them later.
This system demonstrates a way to produce cryptographically verifiable QoD results that can be audited independently.
Potential use cases:
• telecom QoS assurance
• network SLA verification
• third-party performance audits
• regulatory compliance records
Current version:
v0.4
Major features:
• FastAPI QoD proof service
• tamper-evident proof ledger
• runtime contract artifact
• Ed25519 signatures
• JWKS key discovery
• proof bundle endpoint