Repository navigation
Conversation
The MPT page reads the issuer's account history and filters it for the MPT, but stopped after 10 empty pages (550 transactions). MPTs whose issuer kept transacting afterwards showed "No transactions found." The MPT page now keeps reading until it reaches the issuance's creation transaction, reads from the Clio server (full history on testnet and devnet), and retries a failed page twice. The hook also stops auto-fetching after a failure, which the old attempt cap hid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… set The auto-fetch effect only re-ran when shouldAutoFetch changed. When a page's fetching state and data land in the same render, shouldAutoFetch stays true, the effect doesn't re-run, and the scan stalls. It showed up under @testing-library/react 16 (the locked version), where the scan stopped after two pages. Re-running the effect per loaded page fixes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fetchUntilEnd read every page back to the issuance's creation on page load, so a busy MPT downloaded its whole history on every visit. Replace it with minResults: auto-fetch, uncapped, until 20 matches are loaded or the creation is reached, and have "Load more" fetch the next 20, skipping empty pages. Reset the target when the token changes, since the hook stays mounted across MPT pages. Make the fake-timer tests let waitFor drive the clock, and add a real-timer test for the per-page effect re-run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kuan121
marked this pull request as ready for review
November 5, 2026 19:53
minResults kept auto-fetching until 20 matches loaded, with no limit on non-matching pages. An issuer with a long run of unrelated transactions (or anyone sending it many tiny payments) made every visit to an older MPT read thousands of pages. Each round, the initial load or one "Load more", now reads at most 50 pages; the budget resets on "Load more" and when the token changes. When the budget runs out before any match, the MPT page shows "Try loading more transactions" instead of "No transactions found.", since more history is left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Going back to an MPT already viewed refetched every cached page at once: TablePicker stayed mounted, so react-query refetched the stale infinite query on the key change, bypassing the 200 ms pacing. Key TablePicker by MPT so it remounts and the cache is reused (refetchOnMount is off). Count pages already cached as a finished round, so a remount onto a round left unfinished waits for "Load more" instead of fetching. Choose the P2P (Clio) socket in lib/rippled.ts via a useP2P flag, like the other P2P commands, instead of in the hook with a cast. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The IOU page read 20 issuer transactions per page and stopped after 10 empty pages (~220 transactions), so older IOU transactions were missed. Use the same hook options as the MPT page: 50 per page, scan until 20 matches with a 50-page budget per round, read from the Clio host, retry twice, and show "Try loading more transactions" when the budget runs out. There is no stop at creation, since an IOU has no creation tx. Key TablePicker by token, as on the MPT page. Without it, switching to another currency got 1 request instead of a full round (the attempt counter wasn't reset), and going back refetched every cached page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ches Ask the Clio (P2P) host to filter account_tx by the MPT. Only matching rows are sent, and Clio matches through metadata too, so Vault and LoanBroker transactions that change the MPT's balances now show. Rows the server filtered aren't filtered again in the browser, which dropped them. Hosts without a configured Clio connection (custom networks) get no filter and keep the browser-side filter. Clio returns a Batch's inner transactions but not the Batch, so add each parent Batch (via ParentBatchID) after its last inner transaction, as the account page lists them. Without the server filter, keep a Batch whose inner transactions mention the token; its summary drops them. Revert the IOU page to main: the filter is MPT-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The parent Batch was looked up on the main host. On testnet and devnet that is rippled with short history, so a Batch older than it was silently dropped while its inner rows, from Clio, still showed. Give getTransaction the same useP2P flag as getAccountTxs and look the Batch up on the Clio host the rows came from. Drop three tests that duplicate stronger ones: two mocked Batch filter tests (covered by the real-Batch test) and a main-socket default test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Clio filtering by MPT, a response holds only matching rows, so a larger page mostly saves requests. Measured: the reported testnet MPT needs 7 requests instead of 33, and the densest mainnet MPT found (0627B685…, 182 of 200 issuer transactions match) peaks at 623 KB per response, under s2.ripple.com's 1 MB per 0.5 s limit. 400 reached 953 KB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
Fixes the MPT page's "All" tab missing transactions. It gave up about 550 transactions back in the issuer's history, and dropped Batch, Vault and LoanBroker transactions.
account_txis sent withmpt_issuance_id(Clio 2.8.0+, feat: Support filtering txns by mpt_issuance_id XRPLF/clio#3153), so the server returns only rows linked to the MPT, including rows linked only through metadata (Vault, LoanBroker). The browser doesn't filter them again.ParentBatchID) is fetched from the same Clio host and added after its inner transactions, as on the account page. This includes Batches sent by holders. The main host isn't used for this, since on testnet and devnet it's rippled with short history.TablePickeris keyed by MPT, so going back to an MPT reuses its cache instead of refetching every page at once.The IOU page is unchanged. This is a stopgap until Clio's
mptoken_issuance_historyis usable.Context of Change
Reported on testnet: MPT 014BAF7C… shows "No transactions found." while its issuer's account page lists them. The page filtered the issuer's
account_txin the browser and stopped after 11 pages (550 transactions); this MPT's 6 transactions are about 1,540 back. The cap dates from #1264.Why this approach:
mptoken_issuance_historystays disabled until the backfill in unmerged XRPLF/clio#3211 runs.limitcaps transactions scanned, not rows returned, so a response grows with the number of matches. At 250, the densest mainnet MPT found (0627B685…, 182 of its issuer's newest 200 transactions match) peaks at 623 KB per response, unders2.ripple.com's 1 MB per 0.5 s limit; at 400 it reached 953 KB. The reported MPT needs 7 requests.Type of Change
Codebase Modernization
The changed files were already hooks and TypeScript.
Before / After
014BB4E5…(15 Batches)Test Plan
lint:ci,build-tsandtest:cipass afternpm ciwith CI's environment variables (313 suites, 1,910 tests).s2.ripple.com(20 pages, no rate limiting).0627B685…shows 231 rows on load and 514 after two "Load more" clicks, peaking at 641 KB per 0.5 s with no rate limiting. With 2 or 3 tabs on one IP (23 runs),account_txwas never rate limited and every tab showed all rows; the onlyslowDownreplies were for the page's existingfeatureandserver_inforequests.Known limits:
mptoken_issuance_historywould list them.maindoesn't show them either.main(noxrpl-clienttimeout).Future Tasks
mptoken_issuance_historyonce feat: Add migration backfill for mptoken_issuance_history XRPLF/clio#3211 is released and the public Clio servers are backfilled.🤖 Generated with Claude Code