Skip to content

Conversation

gianbelinche
Copy link
Contributor

Motivation
We want to make the mempool max size a parameter

Description
Adds the mempool max size as a parameter to ethrex command

Closes #4600

@gianbelinche gianbelinche requested a review from a team as a code owner September 24, 2025 18:59
@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 18:59
@github-actions github-actions bot added L1 Ethereum client L2 Rollup client replay labels Sep 24, 2025
Copy link
Contributor

@Copilot 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 adds a configurable mempool max size parameter to the ethrex command and blockchain components. Previously, the mempool size was hardcoded to 10,000 transactions.

  • Adds --mempool.maxsize CLI argument with default value of 10,000
  • Updates all blockchain constructor calls to accept the max mempool size parameter
  • Replaces hardcoded MEMPOOL_MAX_SIZE constant with configurable parameter

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cmd/ethrex/cli.rs Adds mempool_max_size CLI parameter with default value
cmd/ethrex/initializers.rs Updates init_blockchain to accept max_mempool_size parameter
cmd/ethrex/l2/initializers.rs Passes mempool max size from CLI options to blockchain init
cmd/ethrex_replay/src/cli.rs Uses constant for mempool size in replay operations
crates/blockchain/blockchain.rs Updates Blockchain constructors to accept max_mempool_size
crates/blockchain/mempool.rs Removes hardcoded constant, adds max_mempool_size field
crates/blockchain/smoke_test.rs Updates test blockchain creation with mempool size parameter
crates/networking/p2p/sync.rs Adds dummy mempool size constant for syncing
tooling/ef_tests/blockchain/test_runner.rs Uses test constant for mempool size in EF tests
tooling/ef_tests/state_v2/src/modules/block_runner.rs Uses test constant for mempool size in state tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Sep 24, 2025

Lines of code report

Total lines added: 57
Total lines removed: 0
Total lines changed: 57

Detailed view
+--------------------------------------------------------------+-------+------+
| File                                                         | Lines | Diff |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/bench/build_block_benchmark.rs             | 232   | +3   |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/bench/import_blocks_benchmark.rs           | 37    | +3   |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/cli.rs                                     | 514   | +19  |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/initializers.rs                            | 395   | +3   |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/initializers.rs                         | 256   | +5   |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex_replay/src/cli.rs                          | 1016  | +3   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs                       | 865   | +13  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/mempool.rs                          | 731   | +4   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/payload.rs                          | 660   | +1   |
+--------------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/state_v2/src/modules/block_runner.rs | 144   | +3   |
+--------------------------------------------------------------+-------+------+

@github-project-automation github-project-automation bot moved this to In Review in ethrex_l1 Sep 26, 2025
@gianbelinche gianbelinche added this pull request to the merge queue Sep 29, 2025
@gianbelinche gianbelinche removed this pull request from the merge queue due to a manual request Sep 29, 2025
@gianbelinche gianbelinche added this pull request to the merge queue Sep 29, 2025
Merged via the queue into main with commit c9882b1 Sep 29, 2025
47 checks passed
@gianbelinche gianbelinche deleted the mempool-max-size-parameter branch September 29, 2025 15:23
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Sep 29, 2025
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 replay
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

Define mempool size
4 participants