Problem
traceFunds() (src/safetynet/tracing.ts) does a breadth-first walk of outgoing payments, following up to perHopLimit (default 10) new addresses per hop for maxHops (default 5) hops, with no cap on the total number of addresses/requests visited. Worst case the frontier grows 10x per hop (10 → 100 → 1,000 → 10,000 → 100,000), meaning a single claim-tracing job can issue on the order of 10^5 Horizon API calls before finishing — or get rate-limited by Horizon partway through and fail the whole trace.
Location
src/safetynet/tracing.ts (traceFunds)
Suggested fix
Add a total-node/request budget (e.g. max 200 addresses across the whole trace) independent of the per-hop and hop-count limits, and stop early once the budget is exhausted rather than only bounding hop depth and per-hop breadth.
Problem
traceFunds()(src/safetynet/tracing.ts) does a breadth-first walk of outgoing payments, following up toperHopLimit(default 10) new addresses per hop formaxHops(default 5) hops, with no cap on the total number of addresses/requests visited. Worst case the frontier grows 10x per hop (10 → 100 → 1,000 → 10,000 → 100,000), meaning a singleclaim-tracingjob can issue on the order of 10^5 Horizon API calls before finishing — or get rate-limited by Horizon partway through and fail the whole trace.Location
src/safetynet/tracing.ts(traceFunds)Suggested fix
Add a total-node/request budget (e.g. max 200 addresses across the whole trace) independent of the per-hop and hop-count limits, and stop early once the budget is exhausted rather than only bounding hop depth and per-hop breadth.