## Summary
Adds live ETL indexing for mptoken_issuance_history by extracting MPT
issuance references from transaction metadata and transaction fields,
then writing both MPT transaction index shapes during the existing MPT
ETL pass. Successful transactions are indexed from affected MPT ledger
objects; failed transactions are indexed only when they carry an
attached MPT issuance reference.
## Changes
- Adds `getMPTokenIssuanceTxsFromTx` to extract issuance transaction
index records from `tesSUCCESS` transactions.
- Scans `AffectedNodes` generically for `MPToken` and `MPTokenIssuance`
ledger objects instead of relying on a transaction-type allowlist.
- Reconstructs issuance IDs for `MPTokenIssuance` objects with
`makeMptID(sequence, issuer)`, avoiding the hashed ledger-key trap.
- Deduplicates distinct issuances per transaction and attaches the
transaction’s affected accounts for account-level fanout.
- Extends `MPTExt` so live and initial ETL data writes:
- existing MPT holder index data
- `mptoken_issuance_transactions`
- `account_mptoken_issuance_transactions`
- Adds a Prometheus counter for MPT issuance transaction index rows
written by ETL.
- Logs unexpectedly large per-transaction fanout.
## Tests
Adds unit coverage for:
- failed transactions producing no records
- `MPTokenIssuanceCreate`, `Destroy`, `Set`, and `MPTokenAuthorize`
- generic transaction-type coverage through `Payment`, `Clawback`,
`OfferCreate`, and `AMMDeposit`
- ID reconstruction from issuance nodes
- multi-issuance fanout and deduplication
- affected-account propagation
- ETL extension writes to both backend index paths while preserving
existing holder indexing
---------
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
`ResponseExpirationCache` is using only `method` (or `command`) as a
key, but responses might be different with different params. This may
lead to a client getting incorrect response because of caching. This PR
fixes it by caching only requests without any additional params.
## Summary
Fixes incomplete MPT holder indexing in ETL.
Previously, Clio only indexed MPT holders when an `ltMPTOKEN` ledger
node was created by an `MPTokenAuthorize` transaction. However, with
future amendments, XRPL can also create `ltMPTOKEN` nodes as part of
other successful transactions, such as `Payment`, when a holder receives
an MPT. Those holders were silently skipped and therefore missing from
the `mpt_holders` RPC results.
This change makes MPT holder indexing metadata-driven instead of
transaction-type-driven. ETL now scans successful transaction metadata
for newly created `ltMPTOKEN` nodes and writes every holder it finds.
## What Changed
- MPT holder extraction now works for any successful transaction that
creates an `ltMPTOKEN`.
- Multiple MPT holders created in a single transaction are all indexed.
- The `mpt_holders` table is kept consistent with ledger metadata
instead of relying on assumptions about which transaction types can
create holder nodes.
- Added regression coverage for MPT holders created by a `Payment`
transaction.
## Testing
- `build/clio_tests '--gtest_filter=MPTExtTests.*'`
- `clang-tidy -p build src/etl/MPTHelpers.cpp src/etl/MPTHelpers.hpp
src/etl/impl/ext/MPT.cpp tests/unit/etl/ext/MPTTests.cpp`