Skip to content

[jsonrpc] Change cursor type from ObjectID to String for ObjectsPage used in owned objects queries.#25134

Closed
stefan-mysten wants to merge 3 commits intoMystenLabs:mainfrom
stefan-mysten:jsonrpc-cursor-objectids
Closed

[jsonrpc] Change cursor type from ObjectID to String for ObjectsPage used in owned objects queries.#25134
stefan-mysten wants to merge 3 commits intoMystenLabs:mainfrom
stefan-mysten:jsonrpc-cursor-objectids

Conversation

@stefan-mysten
Copy link
Contributor

@stefan-mysten stefan-mysten commented Jan 28, 2026

Description

This PR updates the JSON RPC to use a String for cursor type instead of an ObjectID.

Test plan

Existing tests.


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: The cursor type for querying owned objects (suix_getOwnedObjects) has changed from ObjectID to String. In practice, if cursors are passed to the query requests as they're received, the client should see no difference and would not require any changes.
  • GraphQL:
  • CLI:
  • Rust SDK:
  • Indexing Framework:

@stefan-mysten stefan-mysten self-assigned this Jan 28, 2026
@stefan-mysten stefan-mysten temporarily deployed to sui-typescript-aws-kms-test-env January 28, 2026 03:06 — with GitHub Actions Inactive
@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
sui-docs Ready Ready Preview, Comment Jan 28, 2026 4:20am
2 Skipped Deployments
Project Deployment Review Updated (UTC)
multisig-toolkit Ignored Ignored Preview Jan 28, 2026 4:20am
sui-kiosk Ignored Ignored Preview Jan 28, 2026 4:20am

Request Review

@stefan-mysten stefan-mysten changed the title [jsonrpc] Change cursor type from ObjectID to String for Objects [jsonrpc] Change cursor type from ObjectID to String for ObjectsPage used in owned objects queries. Jan 28, 2026
@@ -3629,7 +3629,7 @@ async fn test_get_owned_objects_owned_by_address_and_check_pagination() -> Resul
.with_previous_transaction(),
),
)),
cursor,
cursor.clone(),
Copy link
Contributor Author

@stefan-mysten stefan-mysten Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ObjectID has Copy, so the cursor now needs to be cloned as String does not have Copy.

@@ -164,6 +165,16 @@ impl<R: ReadApiServer> IndexerApiServer for IndexerApi<R> {
self.metrics.get_owned_objects_limit.observe(limit as f64);
let SuiObjectResponseQuery { filter, options } = query.unwrap_or_default();
let options = options.unwrap_or_default();
let cursor = match cursor {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as on the other PR -- it should still be a stringified ObjectID.

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