Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: cron job for caching relayer balances #1209

Merged
merged 6 commits into from
Sep 12, 2024
Merged

Conversation

dohaki
Copy link
Contributor

@dohaki dohaki commented Sep 12, 2024

This PR introduces a cron-scheduled handler that aims to keep relayer balances for all tokens on all chains fresh. Theoretically, this should further even out worst-case latencies for /limits and /suggested-fees.

Closes ACX-2661

We could use a similar approach for fairly constant and static values as well, such as gasPrice, fillGasExpenditure, latestBlock, etc. One issue is that Vercel only supports a min. interval of minutes. So for TTL values that are in seconds, we would need to create another external trigger

Copy link

linear bot commented Sep 12, 2024

Copy link

vercel bot commented Sep 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-frontend-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 10:03am
sepolia-frontend-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 10:03am

api/cron-cache-balances.ts Outdated Show resolved Hide resolved
@dohaki dohaki merged commit 98f3e61 into master Sep 12, 2024
9 checks passed
@dohaki dohaki deleted the cron-job-cache-balances branch September 12, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants