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

perf: skip initial transaction lookup during log queries #5805

Merged
merged 5 commits into from
Dec 18, 2023

Conversation

rkrasiuk
Copy link
Member

Description

Optimize eth_getLogs endpoint handle by not requesting full blocks from the state cache upon a positive bloom filter match. Request only receipts instead and lookup the transaction hash from the database separately only when the log matching filter parameters match.

This approach resulted in a 300% improvement in long block ranges.

@rkrasiuk rkrasiuk added C-perf A change motivated by improving speed, memory usage or disk footprint A-rpc Related to the RPC implementation labels Dec 18, 2023
@rkrasiuk rkrasiuk changed the title perf: skip expensive things perf: skip initial transaction lookup during log queries Dec 18, 2023
Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

GG!

@gakonst gakonst enabled auto-merge December 18, 2023 09:56
@gakonst gakonst added this pull request to the merge queue Dec 18, 2023
@rkrasiuk rkrasiuk mentioned this pull request Dec 18, 2023
Merged via the queue into main with commit 43f29fe Dec 18, 2023
@gakonst gakonst deleted the perf/optimize-log-query branch December 18, 2023 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants