Skip to content

feat: add mptoken_issuance_history RPC#3141

Draft
BryanJ1ang wants to merge 12 commits into
XRPLF:developfrom
BryanJ1ang:brjiang-mpt-rpc-handler
Draft

feat: add mptoken_issuance_history RPC#3141
BryanJ1ang wants to merge 12 commits into
XRPLF:developfrom
BryanJ1ang:brjiang-mpt-rpc-handler

Conversation

@BryanJ1ang

Copy link
Copy Markdown
Contributor

feat: add mptoken_issuance_history RPC

Summary

Adds mptoken_issuance_history, a Clio-only method that returns the transaction history for a given MPT issuance — the MPT-scoped sibling of nft_history. You can optionally filter by account and/or tx_type.

The index tables, backend fetch methods, and live ETL indexing landed earlier; this wires up the handler on top of them.

The handler

  • Routes to fetchMPTokenIssuanceTransactions or fetchAccountMPTokenIssuanceTransactions depending on whether account is set. When tx_type is given, it filters on TransactionType post-fetch, exactly like account_tx.
  • Follows the nft_history/account_tx conventions for ledger ranges, markers, binary, forward, and limit ([1,100], default 50), including api-version response branching.
  • Gated on backfill completion so it never returns partial history: until this node's MPTTransactionHistoryMigrator reports Migrated, requests get notReady with a message pointing at the --migrate command. Once migrated, the result is cached and the check is skipped — the method turns on automatically, no restart.

BryanJ1ang and others added 12 commits July 7, 2026 12:58
Statement.hpp and Collection.hpp each carried a private static copy of
the same CassError-to-logic_error helper; both now use one shared free
function in data::cassandra::impl.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nst ref

A transaction that fails to deserialize is a deterministic data error, so
rerunning the migration could never get past it; log and skip the row
instead of permanently wedging the backfill. Callback and DB read errors
still fail closed. The scan callback now takes STTx/TxMeta by const ref,
removing a deep copy per scanned row.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Buffer extracted records across transactions and flush in batches
(mirroring the live ETL path's per-ledger accumulation) so the backend
coalesces them into full-size write batches instead of submitting one
tiny write pair per transaction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The warning was not operator-actionable and per-tx fanout beyond the
threshold should not occur in practice; the Prometheus counter still
tracks index rows written.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Key the prepared-statement cache by table name alone (partition key and
select columns are fixed per TableDesc), replace the rowsRead counter
with a bool, and author the read-failure message once for both the log
and the thrown exception.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The TableSpec concept now requires the kSelectColumns list to have
exactly one column per Row tuple element, so the two cannot silently
drift when columns are added or removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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