Skip to content

fix(queue): roll nominator-positions back — its largest coldkey exceeds the budget - #9682

Open
JSONbored wants to merge 1 commit into
mainfrom
queue/rollback-nominator-positions
Open

fix(queue): roll nominator-positions back — its largest coldkey exceeds the budget#9682
JSONbored wants to merge 1 commit into
mainfrom
queue/rollback-nominator-positions

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Rolling one lane back on a measurement.

nominator-positions' largest coldkey holds 722 positions. At ~150 bytes a row that is ~108 KB, and SYNC_BATCH_MAX_BYTES is 96 KB.

packSyncBatchMessages correctly refuses to split a coldkey — splitting one would delete rows the message never carried, which is the entire reason the guard exists — so it throws, the route returns 502, and the producer logs:

post nominator_positions: sync POST failed: curl: (22) The requested URL returned error: 502

Observed at 12:47Z, one tick after the cutover.

The packer is right; the budget is wrong

96 KB is the budget for combining groups into a message. A single indivisible group has a different constraint: it only has to fit the 128 KB transport. Treating both with one number is what made a legitimate 108 KB coldkey unpackable.

Fixing that is a separate change — this lane rejoins after it.

The other two stay

hotkey-alpha and validator-nominator-counts do not prune, so neither has an indivisible group and both split freely. Only the pruning lane has this constraint, which is why only it comes back out.

What this validates

The guard did exactly its job: it refused rather than silently splitting, and the failure surfaced as a loud 502 on the first tick instead of as deleted rows discovered later. That is the trade the key_complete design was making.

…ds the budget

Its largest coldkey holds 722 positions. At ~150 bytes a row that is ~108 KB,
and SYNC_BATCH_MAX_BYTES is 96 KB.

packSyncBatchMessages CORRECTLY refuses to split a coldkey -- splitting one
would delete rows the message never carried, which is the whole reason the
guard exists -- so it throws, the route returns 502, and the producer logs:

  post nominator_positions: sync POST failed: curl: (22) ... error: 502

Observed at 12:47Z, one tick after the cutover.

THE PACKER IS RIGHT AND THE BUDGET IS WRONG. 96 KB is the budget for COMBINING
groups; a single indivisible group only has to fit the 128 KB transport. Fixing
that is a separate change, and this lane rejoins after it.

hotkey-alpha and validator-nominator-counts stay: neither prunes, so neither
has an indivisible group, and both split freely.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 6, 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 f886657 Aug 06 2026, 12:58 PM

@superagent-security

Copy link
Copy Markdown

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

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.

1 participant