Skip to content

feat(validator): paginated admin transaction listing - #2532

Open
sergerad wants to merge 1 commit into
sergerad-validator-tx-block-linksfrom
sergerad-validator-admin-list
Open

feat(validator): paginated admin transaction listing#2532
sergerad wants to merge 1 commit into
sergerad-validator-tx-block-linksfrom
sergerad-validator-admin-list

Conversation

@sergerad

@sergerad sergerad commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Part 2 of a 4-PR stack formalizing the validator admin API (#2455).

The admin listing returned every stored record in one response, which OOMs/breaks on any non-trivial history. Replace it with a paginated listing of committed transactions in committed order, and version the admin paths under /admin/v1/.

  • GET /admin/v1/transactions?block_from=&block_to=&limit=&include_records=: rows ordered by (block_num, block_tx_index) — the only order with any bearing on the chain. In-flight / never-committed rows are not listed (they remain reachable by id).
  • Pagination follows the PaginationInfo convention of the node's sync_* RPCs: responses carry { chain_tip, block_num }, and the next page is the same request with block_from = block_num + 1. No opaque cursor.
  • Pages hold whole blocks: limit is a row-count target and the block that crosses it is served in full, so a page always ends on a block boundary.
  • Items are metadata-only (tx id, position, key epoch, setup context id) unless include_records=true, which carries the full sealed record under a lower limit cap — the full-record-per-row response was most of the memory problem.
  • GET /admin/v1/transactions/{tx_id} returns one full record by id, including for uncommitted transactions.

The listing query costs one indexed seek per page (O(log n), O(n) per sweep). The SQL comment documents why the resume point must be folded into the range's lower bound rather than passed as a second predicate: the two forms plan identically under EXPLAIN QUERY PLAN but the latter measured two orders of magnitude slower.

Stack: #2531#2532#2533#2517

Changelog

[[entry]]
scope       = "validator"
impact      = "changed"
description = "The validator admin transaction listing is paginated (whole-block pages in committed order, PaginationInfo-style cursor) and returns metadata-only items unless full records are requested; admin paths moved under /admin/v1/."

[[entry]]
scope       = "validator"
impact      = "added"
description = "GET /admin/v1/transactions/{tx_id} returns one validated transaction's full sealed record by id."

@sergerad sergerad changed the title sergerad validator admin list feat(validator): paginated admin transaction listing Aug 31, 2026
@sergerad
sergerad force-pushed the sergerad-validator-admin-list branch from d32b468 to e4c2962 Compare August 31, 2026 02:13
@sergerad
sergerad force-pushed the sergerad-validator-admin-list branch from e4c2962 to 9c26542 Compare August 31, 2026 02:28
@sergerad
sergerad marked this pull request as ready for review August 31, 2026 02:32
@sergerad
sergerad force-pushed the sergerad-validator-admin-list branch from 9c26542 to e1078a4 Compare August 31, 2026 02:50
The admin listing returned every stored record in one response, which
breaks on any non-trivial history. Replace it with a paginated listing
of committed transactions in committed order (block number, then index
within the block), served at /admin/v1/transactions. Pages hold whole
blocks; block_from doubles as the cursor and responses carry the
PaginationInfo shape the node's sync RPCs already use. Items are
metadata-only unless include_records is set. Adds
GET /admin/v1/transactions/{tx_id} to fetch one full record by id.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sergerad
sergerad force-pushed the sergerad-validator-admin-list branch from e1078a4 to 2d57892 Compare August 31, 2026 02:59
@sergerad
sergerad requested review from Keinberger, Mirko-von-Leipzig and kkovaacs and removed request for Keinberger August 31, 2026 03:18
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