Skip to content

ledger-history: symbolic resume for the scalar lanes - #27729

Closed
wlmyng wants to merge 1 commit into
wlmyng/ledger-history-bound-unifyfrom
wlmyng/ledger-history-symbolic-resume
Closed

ledger-history: symbolic resume for the scalar lanes#27729
wlmyng wants to merge 1 commit into
wlmyng/ledger-history-bound-unifyfrom
wlmyng/ledger-history-symbolic-resume

Conversation

@wlmyng

@wlmyng wlmyng commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Stacked on #27725. Deliberate wire-behavior change — sign-off required before merge.

Deletes the scalar lanes' eager-resume apparatus (the ScanCoordinate resume/stamp hooks and their u64 overrides, ~40 lines): every lane now carries an after Item as Excluded(coordinate), resolved at the store edge — checkpoints and transactions work like events. The four scalar-semantics unit tests flip back to their symbolic expectations; this commit and its parent document both worlds.

The change is confined to the after sidebefore bounds were already coordinate-exclusive in both worlds, and events are untouched. The three behaviors that change, for sign-off:

  1. Exact-tie attribution: an after Item coinciding with a range edge keys strictly looser than the edge and loses terminal attribution (CURSOR_BOUNDCHECKPOINT_BOUND on ties).
  2. Dense-collapse detection defers to the store edge: windows an after Item empties are no longer resolution-empty; at the tip their terminal reports LEDGER_TIP — the honest poll-again signal for tailing clients (the most common at-tip caller) — and scalar terminal stamps keep the raw coordinate instead of the eager edge.
  3. Resume positions are equivalent throughout — no repeats, no skips; only the reason/cursor-byte reporting moves.

Complete wire delta (197-snapshot characterization suite, #27718; kv and fullnode byte-identical, 7 unique flips)

Snapshot Change
checkpoints__after_at_window_end_asc tie: CURSOR_BOUNDCHECKPOINT_BOUND, same cursor
checkpoints__after_bound_desc desc terminal cursor boundary(cp=3)boundary(cp=2) (raw stamp), reason unchanged
transactions__after_bound_desc desc terminal cursor tx=3tx=2 (raw stamp), reason unchanged
checkpoints__after_item_last_asc at-tip: CURSOR_BOUNDLEDGER_TIP, same cursor
transactions__after_item_last_asc at-tip: CURSOR_BOUNDLEDGER_TIP, cursor cp=4cp=5 (tip-normalized)
walk__checkpoints__limit1_asc (final page) same as checkpoints__after_item_last_asc
walk__transactions__limit1_asc (final page) same as transactions__after_item_last_asc

All flips are on terminal no-item frames; no item rows change anywhere. Events and before-side snapshots: zero diffs.

Once #27718 lands, this PR gains the snapshot updates in-tree, making the delta CI-visible.

Test plan

The delta above is the test plan: enumerated via force-pass replay of the characterization suite; unit suites pass (172/125) with the restored symbolic expectations; clippy clean.


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.

  • gRPC: On ledger-history list endpoints, empty responses caused by an after cursor may report a different QueryEnd reason (CHECKPOINT_BOUND on exact range-edge ties; LEDGER_TIP when the cursor is at the ledger tip — poll again) and terminal cursors on such responses may carry the cursor's raw coordinate rather than its successor. Resume positions are unchanged: feeding any returned cursor back never repeats or skips items.
  • Protocol:
  • Nodes (Validators and Full nodes):
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • Indexing Framework:

@wlmyng
wlmyng temporarily deployed to sui-typescript-aws-kms-test-env August 17, 2026 18:42 — with GitHub Actions Inactive
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sui-docs Ready Ready Preview Aug 17, 2026 7:33pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Preview Aug 17, 2026 7:33pm
sui-kiosk Ignored Ignored Preview Aug 17, 2026 7:33pm

Request Review

Delete the scalar lanes' eager-resume apparatus: the ScanCoordinate
resume/stamp hooks and their u64 overrides. Every lane now carries an
after Item as Excluded(coordinate), resolved at the store edge
(ScanBounds::to_range / the packed event range) — checkpoints and
transactions work like events.

Wire-visible on exactly the after side (before bounds were already
coordinate-exclusive in both worlds):

- Low-edge ties flip: an after Item coinciding with a range edge keys
  strictly looser than the edge and loses terminal attribution
  (CURSOR_BOUND -> CHECKPOINT_BOUND on exact ties).
- Dense-collapse detection defers to the store edge: windows an after
  Item empties are no longer resolution-empty, so their terminal reports
  the range-side reason (at the tip: LEDGER_TIP, the honest poll-again
  signal for tailing clients) and scalar terminal stamps keep the raw
  coordinate and kind instead of the eager Boundary edge.
- The drained-path coverage claim moves with detection; resume positions
  are equivalent throughout (no repeats, no skips).

The four scalar-semantics unit tests flip back to their symbolic
expectations, documenting both worlds across this commit and its parent.
Wire deltas are enumerated in the PR body from the characterization
suite; sign-off required before merge.
@wlmyng
wlmyng force-pushed the wlmyng/ledger-history-bound-unify branch from ed0601e to 7c57071 Compare August 17, 2026 19:28
@wlmyng
wlmyng force-pushed the wlmyng/ledger-history-symbolic-resume branch from 6125dab to 809a78e Compare August 17, 2026 19:28
@wlmyng
wlmyng temporarily deployed to sui-typescript-aws-kms-test-env August 17, 2026 19:28 — with GitHub Actions Inactive
@wlmyng
wlmyng temporarily deployed to sui-typescript-aws-kms-test-env August 17, 2026 19:28 — with GitHub Actions Inactive
@wlmyng wlmyng closed this Aug 18, 2026
@wlmyng
wlmyng deleted the wlmyng/ledger-history-symbolic-resume branch August 19, 2026 07:15
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.

1 participant