Skip to content

graphql: serve Epoch.systemPackages from ListSystemPackages - #28571

Open
nickvikeras wants to merge 1 commit into
nickv/package-member-not-foundfrom
nickv/list-system-packages-graphql
Open

nickvikeras wants to merge 1 commit into
nickv/package-member-not-foundfrom
nickv/list-system-packages-graphql

Conversation

@nickvikeras

@nickvikeras nickvikeras commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

GraphQL's Epoch.systemPackages reads the system packages from Postgres kv_packages. This serves it from MovePackageService.ListSystemPackages (#28561) on the ledger gRPC service instead, as of the checkpoint before the epoch's first, and loads the packages through the KV loader. Pagination by package ID is unchanged. The field resolves to null when the service answers BELOW_EARLIEST_AVAILABLE, or when a listed package version can no longer be loaded (a full node that keeps only each object's latest version lists replaced framework versions it no longer stores). Stacked on #28606.

Rollout: deploy kv-rpc with #28561 before this GraphQL change. A GraphQL service whose ledger gRPC endpoint does not serve ListSystemPackages yet fails every Epoch.systemPackages read.

Test plan

  • New sui-indexer-alt-reader unit tests against a mock MovePackageService: LedgerGrpcReader::list_system_packages returns packages in server order, returns None for OUT_OF_RANGE BELOW_EARLIEST_AVAILABLE, and fails on ABOVE_LATEST_AVAILABLE.
  • The GraphQL transactional tests epochs/system_packages.move (forward, backward and cursor pagination) and transactions/kind/end_of_epoch.move pass with unchanged snapshots.
  • New sui-indexer-alt-e2e-tests test get_package_parity_tests: a fullnode and kv-rpc on the same chain give the same GetPackage, GetDatatype, GetFunction, ListPackageVersions (one lineage and every package, page tokens and cursors in both orders, each server continuing from the other's cursors) and ListSystemPackages answers for a package published and upgraded twice and for the system packages, by storage ID, by version and at checkpoints around each publish.

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL: Epoch.systemPackages is read from the ledger gRPC service instead of Postgres. It resolves to null for an epoch the ledger service cannot serve: one that starts below its earliest available checkpoint, such as on a pruned full node, or one whose system package versions it no longer stores. Operators must point GraphQL at a ledger gRPC service (kv-rpc) that serves ListSystemPackages before upgrading GraphQL.
  • CLI:
  • Rust SDK:
  • Indexing Framework:

@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages branch 3 times, most recently from 7503e3f to 3c4f15e Compare November 5, 2026 00:06
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from 4a6ef8e to 386a953 Compare November 5, 2026 00:17
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages branch from 3c4f15e to 6776299 Compare November 5, 2026 00:51
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from 386a953 to 1240bfb Compare November 5, 2026 00:54
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages branch from 6776299 to 154fc2a Compare November 5, 2026 15:50
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from 1240bfb to a30860d Compare November 5, 2026 15:54
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages branch from 154fc2a to aa88587 Compare November 5, 2026 19:20
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from a30860d to fd5334a Compare November 5, 2026 19:25
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages branch from aa88587 to 9bebda9 Compare November 5, 2026 23:00
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from fd5334a to 2a0f7fb Compare November 5, 2026 23:13
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages branch from 9bebda9 to f08189a Compare November 6, 2026 00:47
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from 2a0f7fb to e08d3ff Compare November 6, 2026 00:47
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages branch from f08189a to 9b7983f Compare November 6, 2026 21:32
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from e08d3ff to 15daa23 Compare November 6, 2026 21:32
@nickvikeras
nickvikeras changed the base branch from nickv/list-system-packages to nickv/package-member-not-found November 6, 2026 21:33
@nickvikeras
nickvikeras force-pushed the nickv/package-member-not-found branch from aceb0f9 to cdfdc30 Compare November 7, 2026 00:15
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from 15daa23 to 8a6afda Compare November 7, 2026 00:15
@nickvikeras
nickvikeras force-pushed the nickv/package-member-not-found branch from 1a1f187 to 9ac52b1 Compare November 13, 2026 04:15
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from 3cb150a to 6e7de46 Compare November 13, 2026 04:15
@nickvikeras
nickvikeras force-pushed the nickv/package-member-not-found branch from 9ac52b1 to c7bd7c1 Compare November 13, 2026 11:11
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from 6e7de46 to 864ae04 Compare November 13, 2026 11:11
@nickvikeras
nickvikeras force-pushed the nickv/package-member-not-found branch from c7bd7c1 to 2dacf83 Compare November 14, 2026 03:01
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch 2 times, most recently from 29263a2 to 9d9d743 Compare November 14, 2026 06:25
@nickvikeras
nickvikeras force-pushed the nickv/package-member-not-found branch from 2dacf83 to 12f720b Compare November 14, 2026 06:25
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from 9d9d743 to d210650 Compare November 15, 2026 02:09
Epoch.systemPackages asks the ledger gRPC service for the system
packages as of the checkpoint before the epoch's first, loads them
through the KV loader, and paginates by package ID as the kv_packages
query did. A BELOW_EARLIEST_AVAILABLE answer resolves the field to null.
@nickvikeras
nickvikeras force-pushed the nickv/package-member-not-found branch from 2ae8a85 to 395a785 Compare November 15, 2026 19:59
@nickvikeras
nickvikeras force-pushed the nickv/list-system-packages-graphql branch from d210650 to 1a073d8 Compare November 15, 2026 19:59

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.

1 participant