Skip to content

chore(validators): retire the nominator_count lakehouse overlay - #9338

Merged
JSONbored merged 1 commit into
mainfrom
chore/retire-nominator-count-overlay
Aug 3, 2026
Merged

chore(validators): retire the nominator_count lakehouse overlay#9338
JSONbored merged 1 commit into
mainfrom
chore/retire-nominator-count-overlay

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

#9276 added a serving-Worker overlay filling nominator_count from the frozen lakehouse mirror. It was the bridge for the period when D1 had no data — and that period is over:

nominator_count is now non-null on 1,028 of 1,028 validators. The overlay could only ever fire on a null count (validatorHotkeysNeedingCount collects exactly those and returns early when there are none). There are none left to fill.

Why remove it rather than leave it

It was not simply dead, which is what makes this worth doing. One situation still reached it: the counts query throwing while the neurons query succeeded. There it served ~557 counts stamped 2026-08-02 from a mirror nothing refreshes — values that age indefinitely.

That is precisely the failure the retired module's own header warned about:

a degraded count is worse than no count, because a card cannot tell its reader which one it got

Null is the honest answer in that case.

Scope

Removed at all eight call sites across the three surfaces that shared it, plus the module and its suite:

Surface File Sites
REST workers/request-handlers/entities.ts 2
GraphQL src/graphql.ts 3
MCP src/mcp-server.ts 3

Each site was a multi-line expression wrapper, so this is careful unwrapping rather than deletion — which is why it got its own PR instead of being tacked onto #9334.

Validation

npm run lint / typecheck / validate / validate:contract-drift   # all clean
npx vitest run tests/request-handlers-entities.test.ts tests/graphql.test.ts \
  tests/mcp-server.test.ts tests/validator-nominators.test.ts \
  tests/validator-nominator-summary.test.ts tests/data-api-neurons-d1.test.ts
# 2,877 passed

Patch coverage by diff intersection: 0 uncovered lines, 0 uncovered branches across all three changed files.

Closes #9337
Part of #9146

#9276 added a serving-Worker overlay filling nominator_count from the frozen
lakehouse mirror. It was the bridge for the period when D1 had no data, and
that period is over: migration 0012 gave the field a live table, #243/#267
gave it a live producer, and #9334 made the tier answer COMPLETELY -- absence
from a fresh scan reads as a confirmed zero, so nominator_count is now non-null
on 1,028 of 1,028 validators.

The overlay could only ever fire on a null count, because
validatorHotkeysNeedingCount collects exactly those and returns early when
there are none. There are none left to fill.

It was not simply dead, which is why this is worth doing rather than leaving.
The one situation that still reached it was a partial failure -- the counts
query throwing while the neurons query succeeded -- and there it served ~557
counts stamped 2026-08-02 from a mirror nothing refreshes, values that age
indefinitely. That is the failure the retired module's own header warned about:
a degraded count is worse than no count, because a card cannot tell its reader
which one it got. Null is the honest answer in that case.

Removed at all eight call sites across the three surfaces that shared it --
REST (workers/request-handlers/entities.ts), GraphQL (src/graphql.ts) and MCP
(src/mcp-server.ts) -- plus the module and its suite. Each site was a
multi-line expression wrapper, so this is unwrapping rather than deletion; the
2,877 tests across those three suites are what makes that safe to assert.

Closes #9337
Part of #9146
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
metagraphed-registry-sync-api f1b1413 Aug 03 2026, 11:21 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
metagraphed-data-api f1b1413 Aug 03 2026, 11:21 PM

@superagent-security

Copy link
Copy Markdown

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored
JSONbored merged commit 79f5274 into main Aug 3, 2026
7 checks passed
@JSONbored
JSONbored deleted the chore/retire-nominator-count-overlay branch August 3, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retire the nominator_count lakehouse overlay now that D1 answers the field completely

1 participant