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

Improve event filtering performance #2212

Open
kkovaacs opened this issue Sep 4, 2024 · 0 comments
Open

Improve event filtering performance #2212

kkovaacs opened this issue Sep 4, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@kkovaacs
Copy link
Contributor

kkovaacs commented Sep 4, 2024

Pathfinder currently does iterate over the range of blocks in the filter and checks the per-block bloom filter for potential matches. Unfortunately loading/checking the bloom filters is fairly slow: for millions of blocks it certainly will require at least a few seconds even on fast hardware.

We could implement a more elaborate scheme similar to what is implemented by Geth: we should store an aggregate (rotated) Bloom filter for a range of blocks and use that filter to check potential matches in a range (~32k) of blocks. This would enable us to efficiently filter on keys in a block range with a fraction of the cost involved with loading all bloom filters in the range.

For an overview (and some extra ideas) check the geth implementation or this write-up.

@kkovaacs kkovaacs added the enhancement New feature or request label Sep 4, 2024
@sistemd sistemd self-assigned this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants