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
Make batch sizes dynamic for eth1 fetch of blocks/logs #4532
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
Oh damn, that's a fun side effect! To prevent this issue from happening again I think a unit test should be possible. You can create a mock provider and check that the pattern of calls is retried and divided as expected. Let me know if you think that's worth it. |
Sorry hit the wrong button publishing the comment 🙏 ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
the dynamic fetch is nifty
Motivation
The batched requests of getBlocksByNumber to nethermind would timeout because it seems that the current code flow apparently whips out all 1000 requests in one go via Promise.all
This PR tries to control the concurrency and at any given time doesn't whip out more than
ETH1_CONCURRENCY
(set to 10) requests to the EL.Seems to have resolved the problem for user:
https://discord.com/channels/593655374469660673/593655641445367808/1018266744789418055