fix(kvstore): decode balance_changes and unchanged_loaded_runtime_objects from KV store - #25828
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
stefan-mysten
requested review from
bmwill and
nickvikeras
and removed request for
bmwill
March 13, 2026 16:35
…jects from KV store Previously, encode() wrote both "bc" (balance_changes) and "ul" (unchanged_loaded_runtime_objects) columns to BigTable, but decode() silently ignored them, always returning empty Vec. This caused the gRPC transaction query API to return empty balance_changes to downstream consumers (explorers, wallets, indexers). - Resolve TODO: wire balance_changes through to gRPC response - Add "bc" and "ul" match arms in decode() - Add unit tests for encode/decode round-trip - Add e2e parity test for batch_get_transactions balance_changes
Extract duplicated read_mask validation logic into a common function to reduce code duplication between get_transaction and batch_get_transactions.
Contributor
Author
|
@stefan-mysten this pr anyone reviewed ? |
dongowu
temporarily deployed
to
sui-typescript-aws-kms-test-env
March 24, 2026 16:48 — with
GitHub Actions
Inactive
nickvikeras
temporarily deployed
to
sui-typescript-aws-kms-test-env
March 24, 2026 17:26 — with
GitHub Actions
Inactive
nickvikeras
temporarily deployed
to
sui-typescript-aws-kms-test-env
March 24, 2026 17:42 — with
GitHub Actions
Inactive
nickvikeras
approved these changes
Mar 24, 2026
Contributor
|
Thanks. This was actually the next task on my todo list. I tacked on one more change to wire up the unchanged loaded runtime objects all the way to the grpc response as well. |
Contributor
Author
|
Thanks for the feedback, I’ll improve this and make it more complete next time. |
jordanjennings-mysten
pushed a commit
that referenced
this pull request
Apr 16, 2026
…jects from KV store (#25828) ## Description This PR plumbs `balance_changes` through the KV-backed transaction read path and exposes it in the v2 transaction RPC response. Previously, `balance_changes` could be written into KV storage but were dropped during decode, and the RPC layer did not return them. This caused KV-backed transaction results to be incomplete and out of parity with fullnode gRPC. ## Changes - decode `bc` into `TransactionData.balance_changes` in `sui-kvstore` - return `balance_changes` from `sui-kv-rpc` v2 when requested via field mask - add unit tests for decode and response rendering - add e2e parity coverage against fullnode `batch_get_transactions` ## Impact - fixes missing `balance_changes` in KV-backed transaction reads - improves parity with fullnode gRPC - adds regression coverage for the end-to-end path ## Test plan How did you test the new or updated feature? --- ## 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): - [x] gRPC: Wire up balance changes and object set for archival - [ ] 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
This PR plumbs
balance_changesthrough the KV-backed transaction read path and exposes it in the v2 transaction RPC response.Previously,
balance_changescould be written into KV storage but were dropped during decode, and the RPC layer did not return them. This caused KV-backed transaction results tobe incomplete and out of parity with fullnode gRPC.
Changes
bcintoTransactionData.balance_changesinsui-kvstorebalance_changesfromsui-kv-rpcv2 when requested via field maskbatch_get_transactionsImpact
balance_changesin KV-backed transaction readsTest plan
How did you test the new or updated feature?
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.