fix(data-layer): beaconchain 429 rate limit resilience#17832
Merged
Conversation
…nd move beaconchain to daily
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
pettinarip
commented
Mar 23, 2026
| [KEYS.EVENTS, fetchEvents], | ||
| [KEYS.DEVELOPER_TOOLS, fetchDeveloperTools], | ||
| [KEYS.TRANSLATION_GLOSSARY, fetchTranslationGlossary], | ||
| [KEYS.BEACONCHAIN, fetchBeaconChain], |
Member
Author
There was a problem hiding this comment.
most important change, from hourly to daily
wackerow
approved these changes
Mar 24, 2026
Member
wackerow
left a comment
There was a problem hiding this comment.
@pettinarip Looks good, left one note..
We could re-target this to staging if we want to pull it in with the deploy
| const totalEthStaked = Math.floor(eligibleether * 1e-9) | ||
|
|
||
| // Wait 1s to respect rate limit | ||
| await new Promise((r) => setTimeout(r, 1000)) |
Member
There was a problem hiding this comment.
Worth double-checking: with this sleep removed, the ethstore fetch fires immediately after the epoch fetch. If beaconcha.in enforces 1 req/sec, the second call will routinely 429 and depend on fetchRetry backoff to recover. We sure this will work as expected?
Member
Author
There was a problem hiding this comment.
Yes, tested. Its already working as expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
fetchRetryutility wrapping Trigger.dev'sretry.fetchwith automatic 429 and 5xx backoff retryfetch()withfetchRetryin beaconchain fetcher, removing the hardcoded 1s sleep between callsCloses #17825
Test plan
fetchRetryretries 429 responses with exponential backoff (2 attempts)