move_package: make GetPackage at_checkpoint fail closed above the indexed tip - #35
Merged
Merged
Conversation
This was referenced Sep 21, 2026
Merged
nickvikeras
marked this pull request as ready for review
September 21, 2026 18:35
bmwill
approved these changes
Sep 21, 2026
nickvikeras
added a commit
to MystenLabs/sui
that referenced
this pull request
Sep 23, 2026
## Description Extend `MovePackageService.GetPackage` so that graphql can move to grpc and deprecate `kv_packages` on postgres Calling with package_id still fetches the exact package. Additionally, only one of the two can be provided: - version: return the lineage's package at exactly this version. - at_checkpoint: return the latest lineage package that existed at or before this checkpoint. The bound must be at or below the highest checkpoint the server has indexed; larger values are `NOT_FOUND` rather than clamped, so a successful answer is exact as of that checkpoint (`Package` carries no checkpoint, so a client could not detect a clamped answer). Contract docs: MystenLabs/sui-apis#35, MystenLabs/sui-rust-sdk#315. Implement on sui-rpc-api and sui-kv-rpc MystenLabs/sui-rust-sdk#305 ## Test plan unit tests in relevant files and e2e 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: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] Indexing Framework: --------- Co-authored-by: Nick <nickvikeras@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
GetPackageResponse.Packagecarries no checkpoint, so a client asking forat_checkpoint = Nthat silently receives the "latest known" version has no way to tell the answer is not exact as ofN, and can persist wrong lineage data downstream. Reword theat_checkpointcontract to fail closed: the bound must be at or below the server's highest indexed checkpoint, and larger values areNOT_FOUND.Also fixes the
package_iddoc, which described the lineage lookup asversion-only althoughat_checkpointuses it too.Implementation on both backends: MystenLabs/sui#27762. SDK vendoring follows in sui-rust-sdk.
Second commit:
EndOfEpochTransactionKind.FORWARDING_ADDRESS_REGISTRY_CREATE = 14was added only to sui-rust-sdk's vendored copy (MystenLabs/sui-rust-sdk#288) and never landed here; a fullmake update-protosin the SDK would silently drop it. Syncstransaction.prototo the SDK copy.Test plan
Doc-only;
buf formatandbuf lintclean.