Skip to content

[maintainer] Ingest validator take/commission into the neurons tier + expose in the directory #2548

Description

@JSONbored

The validator directory's take/commission column cannot be built from current data: the neurons D1 table (NEURON_COLUMNS / NEURON_INSERT_COLUMNS, migration 0007) has no take/commission field, and the refresh-metagraph cron does not fetch it. This needs a schema migration, an ingestion change in the metagraph refresh path, and serving-side plumbing — infra + DB migration, not a self-contained bounty.

Deliverables

  • Add a contiguous migrations/NNNN_*.sql adding a take/commission column to neurons (+ neuron_daily if history is wanted)
  • Extend the metagraph refresh cron / staging loader to populate take from the upstream (Taostats) source and NEURON_INSERT_COLUMNS + normalizeNeuron
  • Add take to NEURON_COLUMNS reads, formatNeuron, and buildGlobalValidatorEntry; expose in /api/v1/validators + contracts + OpenAPI
  • Add the take/commission column to validators.index.tsx once the field ships
  • Backfill/serving tests; guard nullish take from partial upstream snapshots

References

  • repo/src/metagraph-neurons.mjs:7 (NEURON_COLUMNS - no take)
  • repo/src/metagraph-neurons.mjs:15 (NEURON_INSERT_COLUMNS - no take)
  • repo/workers/request-handlers/staging.mjs (metagraph staging/load path)
  • repo/src/metagraph-neurons.mjs:80 (formatNeuron)

size: M · maintainer-only (owner)

Metadata

Metadata

Assignees

Labels

backendmaintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions