DIM · Dagon Inference Marketplace

Observation documents

An observation is the signed result of one probe window on one route. It uses the same JSON envelope as listings (IM/JSON/1, A2); the binary IM/OBS/1 tag was removed.

Example

Signed with a throwaway example operator key; it verifies.

{
  "doc": {
    "route_id": "a19636a556af82613e788bb2e7c32d084902d99b1f04ede436642d90b819f245",
    "window_start": 1795000000,
    "window_end": 1795000042,
    "ttft_ms_p50": 412,
    "ttft_ms_p95": 980,
    "tps_p50": 61,
    "throughput_curve": [
      { "concurrency": 1, "tokens_per_sec": 58, "error_rate": 0 },
      { "concurrency": 4, "tokens_per_sec": 221, "error_rate": 0 },
      { "concurrency": 16, "tokens_per_sec": 803, "error_rate": 0 },
      { "concurrency": 64, "tokens_per_sec": 2710, "error_rate": 156 }
    ],
    "availability": 9882,
    "samples": 85,
    "operator": "7MUbGaHBKXjpwQbFGopZDMHnrr6HQWyGyNbXvxRVTqu7"
  },
  "sig": "fzdfPC2s1gQejpwrMUi1oeSJE4nmP8cNuXNear6ARVvU8OdR+CDXII1nFUL3VVlBtUXn9rABOqW5sHgWBEKZBw==",
  "key": "7MUbGaHBKXjpwQbFGopZDMHnrr6HQWyGyNbXvxRVTqu7"
}

Read it as: 85 attempts in 42 seconds, 84 successes (availability 9,882 basis points), one failure at concurrency 64 (error_rate 156 = 1/64), median time to first token 412 ms and p95 980 ms over the successes.

Fields

Field Type Rule enforced by the indexer
route_id 64 hex A route currently listed by a pinned seller whose listing was rechecked within 900 s.
window_start, window_end unix seconds window_end ≤ now and newer than now − 900 s; window_start ≤ window_end and at most 900 s earlier.
ttft_ms_p50, ttft_ms_p95 ms p50 ≤ p95 ≤ 900,000.
tps_p50 tokens/s Non-negative integer.
throughput_curve 1–4 points Strictly increasing concurrency from {1, 4, 16, 64}; each point has exactly concurrency, tokens_per_sec, error_rate (0–10,000); an error_rate of 10,000 requires tokens_per_sec 0.
availability basis points 0–10,000. If 0, both TTFT percentiles and tps_p50 are 0 and every error_rate is 10,000.
samples count At least 1, at least the sum of the curve's concurrency levels, at most 850 (10 rounds × 85).
operator base58 Must equal the envelope key, which must be in the indexer's operators allowlist.

The document has exactly these ten fields. All values are integers; there are no floats anywhere in signed JSON (A17).

Publishing

The prober posts the envelope to POST <discoveryOrigin>/v1/observations (at most 16 KiB). The indexer's answer is itself a signed, query-bound attestation (index attestation), which the prober verifies against its pinned indexer key before trusting it.

Status Code Meaning Prober behaviour
201 {accepted: true, duplicate: false} Stored. Done.
200 {accepted: true, duplicate: true} Identical envelope already stored. Done.
400 invalid_observation Bad shape, stale or future window, unknown operator, or bad signature. Dropped from the outbox.
404 route_not_found Route not currently listed by a pinned seller. Retried later.
409 observation_conflict The operator is one of the seller's receipt keys or settlers; or the window overlaps or precedes the operator's latest window on that route; or a different signature for the same window. Dropped.
413 request_too_large Over 16 KiB. Dropped.
503 service_unavailable, Retry-After Indexer busy or draining. Retried up to twice after the signed Retry-After.

Every completed observation is written to the prober's outbox before it is sent and is retried as the exact same signed envelope, so a lost acknowledgment never produces a second, different window. A new paid wave is never run just to retry publication.

Storage and serving

  • The indexer keeps up to 100 windows per route and operator.
  • GET /v1/routes and GET /v1/routes/{route_id} return, per pinned operator, only the latest fresh window (window_end within 900 s). The same newest window appears as score_inputs.measurement.
  • GET /v1/routes?family=<family>&observation_history=1 returns every retained window with window_end in the last 24 hours, newest first, up to 1,024 per route.
  • Removing an operator from the allowlist hides its evidence from new responses at the next reload; no database deletion is needed.

Clients verify each observation again under their own operator pins. An observation from an operator they have not pinned does not affect their planning.