[sui-rpc-api][sui-kv-rpc] Rename Event* range elements to IntraTx*, two step resolution from cp range to scan range - #27724
Closed
wlmyng wants to merge 7 commits into
Closed
[sui-rpc-api][sui-kv-rpc] Rename Event* range elements to IntraTx*, two step resolution from cp range to scan range#27724wlmyng wants to merge 7 commits into
Event* range elements to IntraTx*, two step resolution from cp range to scan range#27724wlmyng wants to merge 7 commits into
Conversation
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 18:11 — with
GitHub Actions
Active
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8 tasks
An error occurred while trying to automatically change base from
wlmyng/query-options-grouping
to
main
August 17, 2026 18:46
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 19:25
6661544 to
8955013
Compare
Same behavior on sui-kv-rpc and sui-rpc-api to unconditionally project cp to tx range before is_empty() check, since we always do a lookup for the terminal cursor. This will help eliminate the special case empty_at for ResolvedXRange, as empty windows instead ride the same projection path.
CheckpointRange::from_request + .resolve(options) was a two-step every handler sequenced across two places. ResolvedCheckpointRange::from_request fuses them into one call — the intermediate struct dissolves, its fields becoming locals of the fused body; validation, tip clamp, cursor clamps, and exhaustion attribution are preserved branch for branch. kv handlers previously validated checkpoint bounds before options; they now build options first, matching the fullnode order, so on a request with both invalid the options error wins on both backends.
EventPosition -> IntraTxCoordinate, EventScanBounds -> IntraTxScanBounds, ResolvedEventRange -> ResolvedIntraTxRange, apply_event_cursor_bounds -> apply_intra_tx_cursor_bounds. Rust-side vocabulary only — the wire Position::Events variant and the packed event_seq encoding are untouched. The coordinate space is (tx_seq, index-within-tx); events are its first lane, ListPackages the next. Known residue: the coordinate's field is still named event_index — renaming it is deferred to a compiler-assisted pass.
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 20:39
2840088 to
f972b10
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 21:06 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 21:13
76a2c0c to
7cff068
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 21:13 — with
GitHub Actions
Active
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 21:18 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 21:27
7deaf25 to
e5496d1
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 21:27 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 22:16
e5496d1 to
db04d7a
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 22:17 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 22:20
db04d7a to
5906f65
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 22:20 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 23:32
5906f65 to
a6ddb1b
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 23:32 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 23:42
a6ddb1b to
f972b10
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 23:42 — with
GitHub Actions
Active
Event* range elements to IntraTx*, two step resolution from cp range to scan range
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 23:56
f972b10 to
b57b49b
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 23:56 — with
GitHub Actions
Active
wlmyng
force-pushed
the
wlmyng/ledger-history-window-resolution
branch
from
August 17, 2026 23:56
b57b49b to
8cffd7e
Compare
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 17, 2026 23:56 — with
GitHub Actions
Active
wlmyng
deployed
to
sui-typescript-aws-kms-test-env
August 18, 2026 18:29 — with
GitHub Actions
Active
8 tasks
Contributor
Author
|
Superseded by a re-cut of this stack with cleaner PR boundaries (renames → behavior-preserving consolidation with characterization pins → wire-semantics alignment → unification → symbolic resume): #27751 → #27752 → #27753 → #27754 → #27755. Content is carried over commit-for-commit; the old branch stays as reference. |
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
Initial consolidation of checkpoint-window resolution so a resolved scan is constructed one way and owns its lifecycle identically in sui-rpc-api and usi-kv-rpc.
Every
resolve_{tx,event}_rangespecial-cased the empty checkpoint window with an early return. However, this obfuscated the fact that it still performs a checkpoint-summary read to map cp to tx, and hand-built the same record through a second constructorempty_at. These parallel paths had to independently agree, which led to multiple copies and potential drift. One thing to flag is the entry_checkpoint instantiation on an empty window special case (where on descending, entry_checkpoint = terminal_checkpoint, while in the non-empty case it isterminal_checkpoint - 1. Consider an example where[10, 10)descending vs[3, 10)dsecending.)This special case was eliminated once
checkpoint_to_tx_rangereturned the corresponding[t, t)range for some empty[c, c)range.Commits
Test plan
Existing tests pass.
New unit tests for
ResolvedIntraTxRange::resolveRelease 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.