Receipts Spec

Proofmesh uses Ed25519 signatures, Merkle batching, and WORM storage for verifiable usage and uptime receipts.

Hash → Sign → Batch → Verify Hash Sign Batch Verify

Receipt Structure

Proofmesh usage receipts are structured JSON documents that capture all relevant details of a compute job, including job and provider identifiers, compute and performance metrics, billing breakdown, cryptographic signature, and Merkle batch metadata. Each receipt is designed for verifiability, auditability, and compliance, ensuring that every field can be independently validated and traced.

Core Components

📊
Compute Metrics
GPU model, hours, memory, CPU, storage
⏱️
Performance Data
Latency, throughput, uptime measurements
🔐
Cryptographic Proof
ed25519 signature with public key
💸
Billing Information
Transparent cost breakdown
📑
Compliance Metadata
SOX/GDPR flags and audit trails

Canonical Usage Receipt

Usage Receipt JSON
{
  "receipt_id": "rec_01J7ZYQK6X8R1NQ2R3S4T5",
  "job_id": "job_01J7ZXTKJQG5X3QK6W9B8C",
  "provider": {
    "id": "provider_akash_node_42",
    "name": "Akash GPU Node 42",
    "region": "us-west-2"
  },
  "metrics": {
    "model": "llama-3.1-8b-instruct",
    "gpu_model": "RTX 4090",
    "tokens": 12450,
    "duration_sec": 86.4,
    "p95_latency_ms": 280,
    "uptime_percent": 99.82
  },
  "billing": {
    "unit": "token",
    "rate": 0.00002,
    "amount": 0.249,
    "currency": "USD"
  },
  "signature": {
    "algo": "ed25519",
    "signed_at": "2025-09-07T12:31:04.221Z",
    "public_key": "ed25519:11qYAYKxCrfVS_7TyiQHOg7hcvPapiMlrwIaaPcHURo",
    "sig": "ed25519:h3t9...xQ=="
  },
  "batch": {
    "merkle_root": "0x4f7b2a8e9d3c14d5e6f7a8b9c0d1e2f3a4b5c6d7e8f901234567890abcdef00",
    "interval_start": "2025-09-07T12:30:00.000Z",
    "interval_end": "2025-09-07T12:35:00.000Z",
    "index": 142
  }
}

Verification Process

Proofmesh receipts are cryptographically verifiable through a multi-step process that ensures authenticity, batch integrity, and provider authorization. Security features are built into each step.

Receipt Verification API
# Verify receipt cryptographic signature
curl -X POST https://api.proofmesh.com/v1/receipts/verify   -H "Content-Type: application/json"   -d '{
    "receipt_id": "rec_1a2b3c4d5e6f",
    "signature": "ed25519:3NMftyFBNj7fWPm1...",
    "public_key": "ed25519:11qYAYKxCrfVS_7TyiQHOg7hcvPapiMlrwIaaPcHURo"
  }'

# Response
{
  "valid": true,
  "verification_time": "2024-01-15T14:31:02.456Z",
  "merkle_proof_valid": true,
  "signature_valid": true,
  "provider_authorized": true
}
1
🛡️

Signature Verification

Verify the ed25519 signature using the provider's registered public key and receipt content hash.

Security: Ed25519 signatures, fast and secure elliptic curve cryptography.
2
🌲

Merkle Proof Validation

Validate the receipt's inclusion in the provider's Merkle tree batch for efficient bulk verification.

Security: Merkle batching for efficient, scalable verification.
3

Provider Authorization

Confirm the provider is authorized and their public key is registered in our network.

Security: Only verified provider public keys are accepted.
4
🗄️

WORM Storage

Receipts are stored in write-once, read-many storage for audit compliance.

Security: Immutable storage for audit trails and compliance.

5 Minute Merkle Root Anchoring

We commit a Merkle root of all receipts every 5 minutes using an SPL Memo transaction from a known anchoring key. Anyone can verify off-chain JSON streams against on-chain roots.

Receipts generated within a 5‑minute window are batched into a Merkle tree. The Merkle root is then anchored to the chain, enabling efficient inclusion proofs and minimizing on‑chain costs. Clients verify both the ed25519 signature and the receipt’s inclusion path against the anchored root.

Each root references its exact interval start and end timestamps, so auditors can reproduce the tree and confirm ordering and completeness.

Receipts batched every 5 minutes and anchored on-chain +5m +10m +15m +20m Batch t0–t+5m Batch t+5–t+10m Batch t+10–t+15m Batch t+15–t+20m root root root root

Receipt Schema

Fields captured in a canonical Usage Receipt:

  • receipt_id (string): Unique identifier for the receipt.
  • job_id (string): ID referencing the submitted inference job.
  • provider (object): { id, name, region } of the serving node/provider.
  • metrics (object): { model, gpu_model, tokens, duration_sec, p95_latency_ms, uptime_percent }.
  • billing (object): { unit: "token|second", rate, amount, currency }.
  • signature (object): { algo: "ed25519", signed_at, public_key, sig } over a stable hash of the receipt.
  • batch (object): { merkle_root, interval_start, interval_end, index } anchored every 5 minutes.

Verify via CLI

proofmesh verify \
  --receipt ./usage-receipt.json \
  --merkle-root 0xabc123... \
  --public-key ed25519:11qYAYKxCrfVS_7TyiQHOg7hcvPapiMlrwIaaPcHURo

This command verifies:

  • The ed25519 signature over the stable canonical JSON.
  • Inclusion proof against the 5‑minute Merkle root.
  • That the root was anchored within the expected time window.