From a543752f7d80778a5bfd1c3487010e85576e6cae Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Fri, 23 Jan 2026 17:52:33 +0000 Subject: [PATCH] chore(reth-bench): make from-block a required flag (#21372) --- .../src/bench/generate_big_block.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/bin/reth-bench/src/bench/generate_big_block.rs b/bin/reth-bench/src/bench/generate_big_block.rs index f237bfd47a..0352d0a39d 100644 --- a/bin/reth-bench/src/bench/generate_big_block.rs +++ b/bin/reth-bench/src/bench/generate_big_block.rs @@ -209,10 +209,21 @@ pub struct Command { #[arg(long, value_name = "TARGET_GAS", default_value = "30000000", value_parser = parse_gas_limit)] target_gas: u64, - /// Starting block number to fetch transactions from. - /// If not specified, starts from the engine's latest block. + /// Block number to start fetching transactions from (required). + /// + /// This must be the last canonical block BEFORE any gas limit ramping was performed. + /// The command collects transactions from historical blocks starting at this number + /// to pack into large blocks. + /// + /// How to determine this value: + /// - If starting from a fresh node (no gas limit ramp yet): use the current chain tip + /// - If gas limit ramping has already been performed: use the block number that was the chain + /// tip BEFORE ramping began (you must track this yourself) + /// + /// Using a block after ramping started will cause transaction collection to fail + /// because those blocks contain synthetic transactions that cannot be replayed. #[arg(long, value_name = "FROM_BLOCK")] - from_block: Option, + from_block: u64, /// Execute the payload (call newPayload + forkchoiceUpdated). /// If false, only builds the payload and prints it. @@ -288,7 +299,7 @@ impl Command { format!("Failed to create output directory: {:?}", self.output_dir) })?; - let start_block = self.from_block.unwrap_or(parent_number); + let start_block = self.from_block; // Use pipelined execution when generating multiple payloads if self.count > 1 {