Shawn Xie 0aa7ed4919 feat: Update MPToken ETL to support all transactions types (#3102)
## 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`
2026-06-15 11:46:55 +01:00
2026-04-27 15:30:53 +01:00
2024-07-10 11:42:39 +01:00
2022-09-26 15:46:43 -07:00
2024-03-12 17:40:13 +00:00

Clio

Build status Nightly release status Clang-tidy checks status Code coverage develop branch

Clio is an XRP Ledger API server optimized for RPC calls over WebSocket or JSON-RPC. It stores validated historical ledger and transaction data in a more space efficient format, and uses up to 4 times less space than rippled.

Clio can be configured to store data in Apache Cassandra or ScyllaDB, enabling scalable read throughput. Multiple Clio nodes can share access to the same dataset, which allows for a highly available cluster of Clio nodes without the need for redundant data storage or computation.

📡 Clio and rippled

Clio offers the full rippled API, with the caveat that Clio by default only returns validated data. This means that ledger_index defaults to validated instead of current for all requests. Other non-validated data, such as information about queued transactions, is also not returned.

Clio retrieves data from a designated group of rippled nodes instead of connecting to the peer-to-peer network. For requests that require access to the peer-to-peer network, such as fee or submit, Clio automatically forwards the request to a rippled node and propagates the response back to the client. To access non-validated data for any request, simply add ledger_index: "current" to the request, and Clio will forward the request to rippled.

Note

Clio requires access to at least one rippled node, which can run on the same machine as Clio or separately.

📚 Learn more about Clio

Below are some useful docs to learn more about Clio.

For Developers:

For Operators:

General reference material:

🆘 Help

Feel free to open an issue if you have a feature request or something doesn't work as expected. If you have any questions about building, running, contributing, using Clio or any other, you could always start a new discussion.

Description
An XRP Ledger API Server
Readme 39 MiB
Languages
C++ 97%
Go 1.5%
CMake 1%
Dockerfile 0.3%
Shell 0.1%
Other 0.1%