Summary
readTtl chunks its key list at MAX_KEYS_PER_REQUEST = 100 because the RPC caps how many keys one
getLedgerEntries call accepts. No test has ever sent it more than a handful, and the live checks
run during development only ever sent three keys.
Termination is structurally obvious. What is untested is everything else the loop does: that every
chunk is requested, that entries from all chunks are collected rather than the last one winning,
that latestLedger is reconciled across responses, and that output order still matches the
requested order — which the scan table depends on.
Acceptance Criteria
Tech Stack
TypeScript 5.7 on Node 22+ (CI runs 22 and 24), ESM with moduleResolution: "NodeNext" — relative
imports need the .js extension. @stellar/stellar-sdk is pinned to an exact version; verify RPC
API shape against the installed copy, not against documentation. Tests are Vitest under test/ and
run without a network. npm run format:check, npm run lint, npm run build and npm test must
all be clean.
Summary
readTtlchunks its key list atMAX_KEYS_PER_REQUEST = 100because the RPC caps how many keys onegetLedgerEntriescall accepts. No test has ever sent it more than a handful, and the live checksrun during development only ever sent three keys.
Termination is structurally obvious. What is untested is everything else the loop does: that every
chunk is requested, that entries from all chunks are collected rather than the last one winning,
that
latestLedgeris reconciled across responses, and that output order still matches therequested order — which the scan table depends on.
Acceptance Criteria
getLedgerEntriescall.keys equals the input exactly, with no key sent twice.
latestLedgervalues and asserts which one wins.Tech Stack
TypeScript 5.7 on Node 22+ (CI runs 22 and 24), ESM with
moduleResolution: "NodeNext"— relativeimports need the
.jsextension.@stellar/stellar-sdkis pinned to an exact version; verify RPCAPI shape against the installed copy, not against documentation. Tests are Vitest under
test/andrun without a network.
npm run format:check,npm run lint,npm run buildandnpm testmustall be clean.