Skip to content

sui-rpc: add LedgerService.ListObjectVersions - #330

Draft
nickvikeras wants to merge 1 commit into
nickv/object-max-versionfrom
nickv/list-object-versions
Draft

nickvikeras wants to merge 1 commit into
nickv/object-max-versionfrom
nickv/list-object-versions

Conversation

@nickvikeras

@nickvikeras nickvikeras commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Vendor LedgerService.ListObjectVersions from MystenLabs/sui-apis#43 (27c184e) and regenerate the bindings. The RPC streams one object's history, one item per frame with a per-item cursor: a live object, or an ObjectRemoval where the object was deleted or wrapped, and ends each successful stream with a QueryEnd, like the other ledger List* RPCs but without watermarks. It is bounded by at_checkpoint or, when that is unset, by the server's highest indexed checkpoint. Servers that prune history list the versions they retain and fail with BELOW_EARLIEST_AVAILABLE rather than start or end a listing inside pruned history.

Stacked on #329.

MystenLabs/sui#28632

@nickvikeras
nickvikeras force-pushed the nickv/object-max-version branch from b8e19de to a6dd625 Compare November 3, 2026 00:46
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch from 41981a1 to 13c4878 Compare November 3, 2026 00:46
@nickvikeras
nickvikeras force-pushed the nickv/object-max-version branch from a6dd625 to d20d8aa Compare November 3, 2026 04:34
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch from 13c4878 to 68ee57c Compare November 3, 2026 04:34
nickvikeras added a commit that referenced this pull request Nov 6, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 6, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 6, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 6, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 6, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 6, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 6, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 6, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 7, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 10, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 10, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 11, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch 2 times, most recently from 3b5bce6 to dc55f7e Compare November 11, 2026 01:26
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch 3 times, most recently from 7c4e59e to 629d90b Compare November 12, 2026 20:33
nickvikeras added a commit that referenced this pull request Nov 12, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch from 629d90b to 093172f Compare November 12, 2026 20:55
nickvikeras added a commit that referenced this pull request Nov 12, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 12, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 12, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 12, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch from 093172f to d7ddf0a Compare November 12, 2026 22:14
nickvikeras added a commit that referenced this pull request Nov 12, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 12, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
nickvikeras added a commit that referenced this pull request Nov 13, 2026
# Conflicts:
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.fds.bin
#	crates/sui-rpc/src/proto/generated/sui.rpc.v2.rs
#	crates/sui-rpc/vendored/proto/sui/rpc/v2/error_reason.proto
@nickvikeras
nickvikeras force-pushed the nickv/object-max-version branch from 264c463 to cd77641 Compare November 13, 2026 02:38
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch from d7ddf0a to 079e84a Compare November 13, 2026 02:38
@nickvikeras
nickvikeras force-pushed the nickv/object-max-version branch from cd77641 to c59bd9e Compare November 13, 2026 06:33
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch from 079e84a to d1a769a Compare November 13, 2026 06:33
@nickvikeras
nickvikeras force-pushed the nickv/object-max-version branch from c59bd9e to 8ed23ef Compare November 13, 2026 15:11
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch from d1a769a to 086c3fa Compare November 13, 2026 15:11
@nickvikeras
nickvikeras force-pushed the nickv/object-max-version branch from 8ed23ef to b7bf7e0 Compare November 13, 2026 17:44
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch from 086c3fa to 4a1f71c Compare November 13, 2026 17:44
@nickvikeras
nickvikeras force-pushed the nickv/object-max-version branch from b7bf7e0 to b5eb434 Compare November 13, 2026 18:00
@nickvikeras
nickvikeras force-pushed the nickv/list-object-versions branch 5 times, most recently from f874287 to c789ae1 Compare November 14, 2026 04:28
@nickvikeras
nickvikeras force-pushed the nickv/object-max-version branch from b5eb434 to 0fe37ac Compare November 14, 2026 21:49
Vendors sui-apis 27c184e's ListObjectVersions: a server-streaming RPC listing one object's history by cursor, one item per ListObjectVersionsResponse frame: a live `object` or a `removal` (ObjectRemoval: version, kind DELETED/WRAPPED, removing transaction digest when known), with its `cursor`, ascending or descending, bounded by start_version (inclusive), end_version (exclusive), the options.after/options.before cursors from the response `cursor`, and at_checkpoint (versions written at or before it; when unset, the highest checkpoint the server has indexed). Every successful stream ends with one QueryEnd: ITEM_LIMIT on the last item's frame, or CURSOR_BOUND, CHECKPOINT_BOUND or LEDGER_TIP on a final frame with no item; frames carry no Watermark. options.limit defaults to 50 and is coerced to at most 1000. Removals count toward the limit and obey every bound like live versions; read_mask applies only to `object`. After a removal the object can come back at a higher version: unwrapped after WRAPPED, or created again with the same ID after DELETED (e.g. dynamic fields). Without at_checkpoint, a cursor above the object's version at the indexed tip fails a descending listing with OUT_OF_RANGE / ABOVE_LATEST_AVAILABLE (bound "cursor") and ends an ascending one there with LEDGER_TIP. Servers that prune history, such as fullnodes, list the items they retain, counting retained removals as versions; when an object's older versions were pruned and the request's bounds reach below its oldest retained version, an ascending listing fails up front and a descending one fails after streaming the retained versions, with OUT_OF_RANGE / BELOW_EARLIEST_AVAILABLE and `lowestAvailableVersion` metadata; a request for an object such a server retains no item of fails with the same error without `lowestAvailableVersion`. at_checkpoint above the indexed tip fails with OUT_OF_RANGE and reason ABOVE_LATEST_AVAILABLE. Servers that do not offer the method answer UNIMPLEMENTED; fullnodes without RPC indexes, running the objects compactor, or still restoring history answer UNAVAILABLE. Also vendors QueryOptions' and QueryEnd's method-neutral documentation.

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

Assignees

Couldn't load assignees.