Skip to content

[CRE-7121] Paginate CapabilitiesRegistry v2 reads in registry syncer - #24237

Open
bolekk wants to merge 2 commits into
developfrom
cre-7121-registrysyncer-v2-pagination
Open

bolekk wants to merge 2 commits into
developfrom
cre-7121-registrysyncer-v2-pagination

Conversation

@bolekk

@bolekk bolekk commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

The v2 registry syncer reads getCapabilities, getDONs and getNodes as a single 1024-entry page, so the gas used by each eth_call grows with the registry. On prod mainnet today getDONs takes ~5.75M gas for 13 DONs, and each single-capability "virtual DON" adds ~157k. With shard-1 and later shards, a NOP RPC with a lowered eth_call gas cap would start failing syncs, and that node would stop seeing registry updates.

  • Read in fixed pages (capabilities 200, DONs 20, nodes 50) until a short page comes back. That's ≤~10M gas per call on prod data.
  • New gauge platform_registrysyncer_registry_entries{type=capabilities|dons|nodes} with the number of entries read per sync.
  • Integration test with 45 DONs and 55 nodes (multiple pages each).

Deployment Validation

platform_registrysyncer_registry_entries matches on-chain counts (getDONs/getNodes/getCapabilities lengths) on every node, platform_registrysyncer_sync_failures stays flat, and platform_launcher_capability_hosting_dons is unchanged vs before the upgrade.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

getCapabilities, getDONs and getNodes were each read as a single page of
1024 entries, so one eth_call's gas grows with the registry size. Read in
fixed-size pages instead to stay well below RPC eth_call gas caps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bolekk
bolekk force-pushed the cre-7121-registrysyncer-v2-pagination branch from 8e6080e to 893c003 Compare November 18, 2026 23:26
@bolekk
bolekk marked this pull request as ready for review November 18, 2026 23:27
@bolekk
bolekk requested a review from a team as a code owner November 18, 2026 23:27
@bolekk
bolekk force-pushed the cre-7121-registrysyncer-v2-pagination branch from be02676 to ee88e98 Compare November 18, 2026 23:29
Records how many capabilities, DONs and nodes were read on-chain per sync,
so read counts can be compared against on-chain totals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bolekk
bolekk force-pushed the cre-7121-registrysyncer-v2-pagination branch from ee88e98 to 37174b1 Compare November 18, 2026 23:38
@bolekk
bolekk requested review from a team as code owners November 18, 2026 23:38

This branch has not been deployed

No deployments
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.

2 participants