Skip to content

feat: micro-optimize eth_getLogs#8

Closed
thaodt wants to merge 8 commits into
mainfrom
feat/eth_getlogs_optz
Closed

feat: micro-optimize eth_getLogs#8
thaodt wants to merge 8 commits into
mainfrom
feat/eth_getlogs_optz

Conversation

@thaodt

@thaodt thaodt commented Jun 5, 2025

Copy link
Copy Markdown

the current eth_getLogs behavior supports two types of block filtering:

  • AtBlockHash: Gets logs for a specific block by hash
  • Range: Gets logs for a range of blocks
    For range queries, it processes blocks in chunks of max_headers_range (1000 blocks) and uses bloom filters to quickly skip blocks that can't contain matching logs, then fetches receipts and logs only for blocks that might contain matches.

I've updated to process chunks of blocks in parallel for get_logs_in_block_range_inner() fn, I'm profiling it but at a first sight, here is what I had so far.
Basically for small ranges (1 chunk or less), I still apply the current approach.

@thaodt thaodt requested review from 0xNarumi and hai-rise June 5, 2025 08:45
@thaodt thaodt force-pushed the feat/eth_getlogs_optz branch from e071d6c to 02d3934 Compare June 5, 2025 09:42
@github-actions github-actions Bot closed this Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants