Skip to content

Conversation

@pablodeymo
Copy link
Contributor

Motivation

Bloom filter was set in a small capacity.

Description

Closes #issue_number

@pablodeymo pablodeymo requested a review from a team as a code owner November 3, 2025 16:04
Copilot AI review requested due to automatic review settings November 3, 2025 16:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR increases the initial capacity of the trie layering bloom filter from 100,000 to 1,000,000 entries, representing a 10x increase to better accommodate larger workloads.

  • Adjusted the initial capacity parameter of the bloom filter from 100,000 to 1,000,000

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

impl TrieLayerCache {
// TODO: tune this
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

The create_filter function has a TODO comment indicating these parameters need tuning. With this significant 10x increase in initial capacity, consider documenting the rationale for this specific value (e.g., based on observed workload patterns or performance testing) to help future maintainers understand why 1,000,000 was chosen and when it might need adjustment.

Suggested change
// TODO: tune this
// Initial capacity set to 1,000,000 to accommodate expected high volume of keys per observed workload patterns.
// This is a 10x increase over typical defaults, based on performance testing to minimize false positives and
// avoid frequent resizing. Future maintainers should revisit this value if workload characteristics change,
// or if memory usage/performance becomes a concern. See issue #1234 for tuning discussion.

Copilot uses AI. Check for mistakes.
@jrchatruc jrchatruc changed the title fix(l1, l2) tuning parameters of qfilter fix(l1, l2): tuning parameters of qfilter Nov 3, 2025
@github-actions github-actions bot added L1 Ethereum client L2 Rollup client labels Nov 3, 2025
@github-project-automation github-project-automation bot moved this to In Review in ethrex_l1 Nov 3, 2025
@jrchatruc jrchatruc enabled auto-merge November 3, 2025 17:44
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Lines of code report

Total lines added: 26
Total lines removed: 112
Total lines changed: 138

Detailed view
+---------------------------------------------------------------+-------+------+
| File                                                          | Lines | Diff |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs                        | 1295  | -10  |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/payload.rs                           | 672   | -4   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/tracing.rs                           | 126   | -4   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/vm.rs                                | 101   | -3   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/l2/based/block_fetcher.rs                       | 499   | -9   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/l1_committer.rs                    | 1059  | -5   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/eth/account.rs                   | 262   | +1   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/storage/api.rs                                  | 243   | -3   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/storage/store.rs                                | 1513  | -8   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/storage/store_db/rocksdb.rs                     | 1540  | -54  |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/rocksdb.rs                      | 207   | +13  |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/rocksdb_locked.rs               | 85    | +10  |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/bench/revm_comparison/src/levm_bench.rs | 84    | -4   |
+---------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/runner/src/main.rs                      | 272   | -5   |
+---------------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/blockchain/test_runner.rs             | 338   | +1   |
+---------------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/state/utils.rs                        | 61    | +1   |
+---------------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/state_v2/src/modules/utils.rs         | 44    | -3   |
+---------------------------------------------------------------+-------+------+

@jrchatruc jrchatruc added this pull request to the merge queue Nov 3, 2025
Merged via the queue into main with commit 271e68a Nov 3, 2025
38 checks passed
@jrchatruc jrchatruc deleted the bloom_filter_tune branch November 3, 2025 19:46
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 3, 2025
@github-project-automation github-project-automation bot moved this to Done in ethrex_l2 Nov 3, 2025
fedacking added a commit that referenced this pull request Nov 7, 2025
fedacking added a commit that referenced this pull request Nov 8, 2025
xqft pushed a commit that referenced this pull request Nov 11, 2025
**Motivation**

Bloom filter was set in a small capacity.

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes #issue_number

---------

Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com>
Co-authored-by: Javier Chatruc <jrchatruc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client L2 Rollup client

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants