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

feature(provider): ENS/Basenames caching #15575

Merged
merged 5 commits into from
Feb 28, 2025
Merged

Conversation

0xTxbi
Copy link
Member

@0xTxbi 0xTxbi commented Feb 27, 2025

Description

This PR introduces intelligent caching for ENS/BaseName resolution in our provider worker. It detects name resolution requests by matching common method signatures (0x3b3b57de, 0x691f3431, etc.) and caches responses for 1 hour by default. Cache duration is configurable via CACHE_DURATION_SECONDS in wrangler.toml.

Works for both forward and reverse lookups, reducing provider load and improving response times.

Issues

Fixes #15542
Refs #15542

Checklist:

  • 1 PR, 1 purpose: my Pull Request applies to a single purpose
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the docs to reflect my changes if applicable
  • I have added tests (and stories for frontend components) that prove my fix is effective or that my feature works
  • I have performed a self-review of my own code
  • If my code involves visual changes, I am adding applicable screenshots to this thread

@0xTxbi 0xTxbi requested a review from julien51 February 27, 2025 20:03
@cla-bot cla-bot bot added the cla-signed label Feb 27, 2025
Copy link

vercel bot commented Feb 27, 2025

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

Name Status Preview Comments Updated (UTC)
unlock-airdrops ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2025 10:23am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
unlock-static-site ⬜️ Ignored (Inspect) Feb 28, 2025 10:23am
unlock-storybook ⬜️ Ignored (Inspect) Feb 28, 2025 10:23am

Copy link
Member

@julien51 julien51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing. I will deplpoy tomorrow

@0xTxbi 0xTxbi merged commit d0360a3 into master Feb 28, 2025
13 of 14 checks passed
@0xTxbi 0xTxbi deleted the provider-cache-name-resolution branch February 28, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add Name resolution caching to RPC worker
2 participants