feat(indexer,frontend): distant-pair route progress and latency (#485) #1021

Merged
PlasticDigits merged 1 commit from feat/485-distant-pair-route-progress into main 2026-07-13 11:50:12 +00:00
PlasticDigits commented 2026-07-13 10:57:31 +00:00 (Migrated from gitlab.com)

Summary

  • Indexer: reuse a 15s TTL token-graph snapshot, 90s hybrid cache for multi-hop (≥2) routes (12s for 1-hop), stage timing logs, and advisory GET /api/v1/route/solve/progress (same cache-key isolation as hybrid quotes; not LCD-heavy).
  • Frontend: Swap polls progress ~1 Hz and shows live Searching status after ~500ms; preserves #484 refetch / receive / submit invariants. Trade market stays on pair-scoped Quoting… (a11y live region).
  • Docs/skills/invariants + make verify-issue-485.

Closes #485

Test plan

  • make verify-issue-485 (docs drift, lib progress/graph/cache, integration progress + cache tier, frontend unit tests)
  • cargo test --test api_route_solve -- --test-threads=1 (full route solve suite)
  • Swap distant CW20 pair: after ~500ms see advancing Searching label; amount settles; no perpetual Calculating (#484)
  • Fast/direct pair: no noisy Searching flash
  • Background refetch: prior receive amount stays; submit still gated while fetching
  • Progress endpoint returns no estimated_amount_out; idle before solve; terminal after
  • Cache still isolates discount tiers (route_solve_get_cache_*)
## Summary - Indexer: reuse a 15s TTL token-graph snapshot, 90s hybrid cache for multi-hop (≥2) routes (12s for 1-hop), stage timing logs, and advisory `GET /api/v1/route/solve/progress` (same cache-key isolation as hybrid quotes; not LCD-heavy). - Frontend: Swap polls progress ~1 Hz and shows live Searching status after ~500ms; preserves #484 refetch / receive / submit invariants. Trade market stays on pair-scoped Quoting… (a11y live region). - Docs/skills/invariants + `make verify-issue-485`. Closes #485 ## Test plan - [ ] `make verify-issue-485` (docs drift, lib progress/graph/cache, integration progress + cache tier, frontend unit tests) - [ ] `cargo test --test api_route_solve -- --test-threads=1` (full route solve suite) - [ ] Swap distant CW20 pair: after ~500ms see advancing Searching label; amount settles; no perpetual Calculating (#484) - [ ] Fast/direct pair: no noisy Searching flash - [ ] Background refetch: prior receive amount stays; submit still gated while fetching - [ ] Progress endpoint returns no `estimated_amount_out`; idle before solve; terminal after - [ ] Cache still isolates discount tiers (`route_solve_get_cache_*`)
PlasticDigits commented 2026-07-13 11:50:13 +00:00 (Migrated from gitlab.com)

mentioned in commit 9925165dde

mentioned in commit 9925165dde67b1cd70b8d62c881b94b2f37b6699
PlasticDigits (Migrated from gitlab.com) merged commit 9925165dde into main 2026-07-13 11:50:13 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1021
No description provided.