Skip to content

Docs page: Chain-events deep-history endpoints (/api/v1/chain-events, /chain-events/stats, /blocks/{n}/chain-events) #2566

Description

@JSONbored

Document the Postgres deep-history all-events tier: /api/v1/chain-events, /chain-events/stats, /blocks/{n}/chain-events — proxied to the separate DATA_API worker (Hyperdrive/Postgres). Because these 503 with data_tier_unavailable when the data worker isn't deployed and the tier involves infra state + a split-brain caveat vs the D1 explorer, this doc page needs maintainer knowledge of the deployment topology to be accurate — hence maintainer-only.

Deliverables

  • New docs page documenting each chain-events route: purpose, params, response shape, curl example, and the 503 data_tier_unavailable condition
  • Accurately describe the two-store split (D1 near-realtime explorer vs Postgres deep-history) and the deployment dependency (metagraphed-data-api / DATA_API binding)
  • Disambiguate the three 'events' concepts (/api/v1/events SSE change feed vs /chain-events Postgres vs /subnets/{netuid}/events D1)
  • Verify against api.mjs:845 (proxy) + data-api.mjs:64; no infra credentials in the doc

References

  • repo/workers/api.mjs:845 (handleChainEventsProxy)
  • repo/workers/data-api.mjs:64 (chain_events query)

📸 Required: before/after screenshots (this is a UI change)

Non-negotiable. PRs that change UI must include a before/after screenshot table. PRs without it are automatically closed — no exceptions.

Rules:

  • Show every page/feature you changed — before and after, one row each.
  • Use the markdown table below. Screenshots go inside the table only — no large full-size images pasted elsewhere in the PR.
  • Each cell is a clickable thumbnail (a small image linking to the full-size image) with a one-line caption underneath.
  • Upload screenshots to the PR by drag-and-drop (GitHub hosts them on its CDN). Do NOT commit image files to the repo.

Copy this and fill it in (replace FULL_IMAGE_URL with the URL GitHub gives you after you drop the image in):

| Page / Feature | Before | After |
|---|---|---|
| `/your-route` | [<img src="FULL_IMAGE_URL" width="260">](FULL_IMAGE_URL)<br><sub>before: short caption</sub> | [<img src="FULL_IMAGE_URL" width="260">](FULL_IMAGE_URL)<br><sub>after: short caption</sub> |


size: S · maintainer-only (owner)

Metadata

Metadata

Assignees

Labels

frontendFrontend / metagraphed-ui workmaintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions