Skip to content

Conversation

@edg-l
Copy link
Contributor

@edg-l edg-l commented Nov 4, 2025

Keeping a per layer bloom helps avoiding rehashing every time a bloom rebuild happens.
This is because the bloom merge method uses the u64 hash keys directly instead of rehashing the value of type T.

This is an improved version of #5175 where in addition to that we keep a per layer bloom to avoid extra hash work.

Keeping a per layer bloom helps avoiding rehashing every time a bloom
rebuild happens.
This is because the bloom merge method uses the u64 hash keys directly
instead of rehashing the value of type T.

This is an improved version of #5175
where in addition to that we keep a per layer bloom to avoid extra hash
work.
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Lines of code report

Total lines added: 0
Total lines removed: 7
Total lines changed: 7

Detailed view
+-------------------------------------------+-------+------+
| File                                      | Lines | Diff |
+-------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/layering.rs | 177   | -7   |
+-------------------------------------------+-------+------+

@edg-l edg-l moved this from Todo to In review in ethrex_performance Nov 4, 2025
@edg-l edg-l moved this to In Review in ethrex_l1 Nov 4, 2025
/// Per layer bloom filter, None if the size was exceeded (exceedingly rare).
/// Having a bloom per layer avoids the cost of rehashing each key every time we rebuild the globam bloom,
/// since merge simply uses the u64 hashed keys instead of rehashing.
bloom: Option<qfilter::Filter>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't change it right now, but I think we should start referring to this as "query filter", as we're not necessarily relying on the Bloom implementation (approximate query filter is the "generic" name, but too long).

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Benchmark Block Execution Results Comparison Against Main

Command Mean [s] Min [s] Max [s] Relative
base 338.061 ± 0.581 337.301 338.928 1.50 ± 0.00
head 225.297 ± 0.390 224.381 225.793 1.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client performance

Projects

Status: In Review
Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants