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=&tx_index_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 is strict keyset paging: (block_from, tx_index_from) is the cursor, and limit is honored exactly. Responses follow the PaginationInfo convention of the node's sync_* RPCs, carrying { chain_tip, block_num, block_tx_index }; the next page is the same request resumed one position past the last row (block_from = block_num, tx_index_from = block_tx_index + 1). No opaque cursor.
  • Items are metadata-only (tx id, position, key epoch, setup context id) unless include_records=true, which loads each row's full sealed record by id 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: the row-value comparison (block_num, block_tx_index) >= (?, ?) seeks the link table's primary key directly (verified under EXPLAIN QUERY PLAN: no scan, no sort step).

Stack: #2531#2532#2533#2517

Changelog

[[entry]]
scope       = "validator"
impact      = "changed"
description = "The validator admin transaction listing is paginated (strict keyset 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
@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
@sergerad
sergerad force-pushed the sergerad-validator-admin-list branch from 2d57892 to 6ab831f Compare September 2, 2026 01:17
@sergerad
sergerad force-pushed the sergerad-validator-admin-list branch 3 times, most recently from 43d0c4f to fc3f127 Compare September 2, 2026 03:27
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 are strict
keyset pages: (block_from, tx_index_from) is the cursor, the row limit
is honored exactly, and responses carry the PaginationInfo shape the
node's sync RPCs already use. Items are metadata-only unless
include_records is set, in which case each record is loaded by id.
Adds GET /admin/v1/transactions/{tx_id} to fetch one full record by id.
@sergerad
sergerad force-pushed the sergerad-validator-admin-list branch from fc3f127 to ed3cc9a Compare September 2, 2026 03:43
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