Skip to content

Fix introduce retries if usdc tx fetching exceeds limits #275

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ii-cruz
Copy link
Member

@ii-cruz ii-cruz commented Jul 15, 2025

Introduces a mechanism to retry the request with a smaller block interval if there is an error.

This is an example of the error message we get where no more tx are fetched afterwards.
Query timeout exceeded. Consider reducing your block range. Based on your parameters and the response size limit, this block range should work: [0x42b950f, 0x435784f]

Alchemy restricts log responses to 10k if the block range is >2000. So the safe query filter is tried with the provided block range, and if it fails, it attempts with a 2000 block range. If that still fails, it halves the range. https://www.alchemy.com/docs/deep-dive-into-eth_getlogs

@ii-cruz ii-cruz requested a review from nibhar July 15, 2025 17:51
@ii-cruz ii-cruz self-assigned this Jul 15, 2025
@ii-cruz ii-cruz marked this pull request as draft July 16, 2025 13:36
@ii-cruz ii-cruz force-pushed the iicruz/fix-usdc-max-tx-fetching branch from 4be36be to b456665 Compare July 16, 2025 16:26
@ii-cruz ii-cruz marked this pull request as ready for review July 17, 2025 13:06
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.

1 participant