-
Notifications
You must be signed in to change notification settings - Fork 5
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
Optimize/fetcher (EVM) #141
Conversation
Do u have any benches on improvements here? |
Yes, key flattening is used to fetch all required headers all at once in the first stage (during fetching) which eliminates over-fetching as it used to be (i.e., headers were requested at different stages and were often re-fetched over and over again). For receipts and transactions, with this PR we only construct the transaction and receipt Merkle tree once per queried block instead of Without optimization: With optimization: The optimized run reduced the total test time from 55,130 s to 44,287 s—a roughly 19,7% improvement overall. Notably, one test improved by nearly 39%, while the others had around a 20% speed-up. Also, those optimizations are particularly effective to avoir over-fetching of Ethereum headers in several scenarios (i.e., typically when multiple keys access the same block). |
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 ready to merge
@codyx Can u run same benches as above and paste them here before merge? |
Pretty much identical, small delta due to network latency/randomness.
|
EVM only: