From 0d14109efe2fae8f058fa79d141032199bb3a2a8 Mon Sep 17 00:00:00 2001 From: Soubhik Singha Mahapatra Date: Wed, 22 Apr 2026 11:26:39 +0530 Subject: [PATCH 1/8] chore: add DecodedBal in ExecutionEnv --- Cargo.lock | 29 ++++++++++--------- Cargo.toml | 2 +- .../tree/src/tree/payload_processor/mod.rs | 6 +++- .../engine/tree/src/tree/payload_validator.rs | 18 +++++++++++- 4 files changed, 38 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd4d89ae6ac..54b2b56f799 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -250,14 +250,15 @@ dependencies = [ [[package]] name = "alloy-eip7928" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8222b1d88f9a6d03be84b0f5e76bb60cd83991b43ad8ab6477f0e4a7809b98d" +checksum = "407510740da514b694fecb44d8b3cebdc60d448f70cc5d24743e8ba273448a6e" dependencies = [ "alloy-primitives", "alloy-rlp", "arbitrary", "borsh", + "once_cell", "serde", ] @@ -1063,7 +1064,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1074,7 +1075,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -2949,7 +2950,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ab67060fc6b8ef687992d439ca0fa36e7ed17e9a0b16b25b601e8757df720de" dependencies = [ "data-encoding", - "syn 1.0.109", + "syn 2.0.117", ] [[package]] @@ -3438,7 +3439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4202,7 +4203,7 @@ dependencies = [ "libc", "log", "rustversion", - "windows-link 0.1.3", + "windows-link 0.2.1", "windows-result 0.4.1", ] @@ -5091,7 +5092,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -6067,7 +6068,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -10913,7 +10914,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -10993,7 +10994,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 1.0.7", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -11582,7 +11583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -11782,7 +11783,7 @@ dependencies = [ "getrandom 0.4.2", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -13051,7 +13052,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e3c153ce556..fd58d5f3bc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -449,7 +449,7 @@ alloy-sol-types = { version = "1.5.6", default-features = false } alloy-chains = { version = "0.2.33", default-features = false } alloy-eip2124 = { version = "0.2.0", default-features = false } -alloy-eip7928 = { version = "0.3.0", default-features = false } +alloy-eip7928 = { version = "0.3.4", default-features = false } alloy-evm = { version = "0.33.0", default-features = false } alloy-rlp = { version = "0.3.13", default-features = false, features = ["core-net"] } alloy-trie = { version = "0.9.4", default-features = false } diff --git a/crates/engine/tree/src/tree/payload_processor/mod.rs b/crates/engine/tree/src/tree/payload_processor/mod.rs index bc274525a81..79924239444 100644 --- a/crates/engine/tree/src/tree/payload_processor/mod.rs +++ b/crates/engine/tree/src/tree/payload_processor/mod.rs @@ -7,7 +7,7 @@ use crate::tree::{ CacheWaitDurations, CachedStateMetrics, CachedStateMetricsSource, ExecutionCache, PayloadExecutionCache, SavedCache, StateProviderBuilder, TreeConfig, WaitForCaches, }; -use alloy_eip7928::BlockAccessList; +use alloy_eip7928::{bal::DecodedBal, BlockAccessList}; use alloy_eips::{eip1898::BlockWithParent, eip4895::Withdrawal}; use alloy_primitives::B256; use crossbeam_channel::{Receiver as CrossbeamReceiver, Sender as CrossbeamSender}; @@ -924,6 +924,9 @@ pub struct ExecutionEnv { /// Withdrawals included in the block. /// Used to generate prefetch targets for withdrawal addresses. pub withdrawals: Option>, + /// Optional decoded BAL for the block. + /// Used to validate and optimize execution. + pub decoded_bal: Option, } impl ExecutionEnv @@ -941,6 +944,7 @@ where transaction_count: 0, gas_used: 0, withdrawals: None, + decoded_bal: None, } } } diff --git a/crates/engine/tree/src/tree/payload_validator.rs b/crates/engine/tree/src/tree/payload_validator.rs index 9ba884c8be7..8ac77280003 100644 --- a/crates/engine/tree/src/tree/payload_validator.rs +++ b/crates/engine/tree/src/tree/payload_validator.rs @@ -48,7 +48,10 @@ use crate::tree::{ PayloadHandle, StateProviderBuilder, StateProviderDatabase, TreeConfig, WaitForCaches, }; use alloy_consensus::transaction::{Either, TxHashRef}; -use alloy_eip7928::{bal::Bal, BlockAccessList}; +use alloy_eip7928::{ + bal::{Bal, DecodedBal}, + BlockAccessList, +}; use alloy_eips::{eip1898::BlockWithParent, eip4895::Withdrawal, NumHash}; use alloy_evm::Evm; use alloy_primitives::{map::B256Set, B256}; @@ -56,6 +59,7 @@ use alloy_primitives::{map::B256Set, B256}; use reth_trie_sparse::debug_recorder::TrieDebugRecorder; use crate::tree::payload_processor::receipt_root_task::{IndexedReceipt, ReceiptRootTaskHandle}; +use alloy_primitives::Bytes; use reth_chain_state::{ CanonicalInMemoryState, DeferredTrieData, ExecutedBlock, ExecutionTimingStats, LazyOverlay, }; @@ -495,6 +499,10 @@ where transaction_count: input.transaction_count(), gas_used: input.gas_used(), withdrawals: input.withdrawals().map(|w| w.to_vec()), + decoded_bal: input + .block_access_list_raw() + .cloned() + .and_then(|raw| DecodedBal::from_rlp_bytes(raw).ok()), }; // Plan the strategy used for state root computation. @@ -2110,6 +2118,14 @@ impl BlockOrPayload { } } + /// Returns the raw rlp block access list embedded in a payload, if present. + pub fn block_access_list_raw(&self) -> Option<&Bytes> { + match self { + Self::Payload(payload) => payload.block_access_list(), + Self::Block(_) => None, + } + } + /// Returns the number of transactions in the payload or block. pub fn transaction_count(&self) -> usize where From 21dac644f50b9c3bb364ee8a8194640456803515 Mon Sep 17 00:00:00 2001 From: Soubhik Singha Mahapatra Date: Wed, 22 Apr 2026 15:04:05 +0530 Subject: [PATCH 2/8] use decoded bal --- .../tree/src/tree/payload_processor/mod.rs | 24 ++++++-------- .../engine/tree/src/tree/payload_validator.rs | 33 +++++++------------ 2 files changed, 22 insertions(+), 35 deletions(-) diff --git a/crates/engine/tree/src/tree/payload_processor/mod.rs b/crates/engine/tree/src/tree/payload_processor/mod.rs index 79924239444..b0ccf54b506 100644 --- a/crates/engine/tree/src/tree/payload_processor/mod.rs +++ b/crates/engine/tree/src/tree/payload_processor/mod.rs @@ -7,7 +7,7 @@ use crate::tree::{ CacheWaitDurations, CachedStateMetrics, CachedStateMetricsSource, ExecutionCache, PayloadExecutionCache, SavedCache, StateProviderBuilder, TreeConfig, WaitForCaches, }; -use alloy_eip7928::{bal::DecodedBal, BlockAccessList}; +use alloy_eip7928::bal::DecodedBal; use alloy_eips::{eip1898::BlockWithParent, eip4895::Withdrawal}; use alloy_primitives::B256; use crossbeam_channel::{Receiver as CrossbeamReceiver, Sender as CrossbeamSender}; @@ -241,7 +241,6 @@ where provider_builder: StateProviderBuilder, multiproof_provider_factory: F, config: &TreeConfig, - bal: Option>, ) -> IteratorPayloadHandle where P: BlockReader + StateProviderFactory + StateReader + Clone + 'static, @@ -264,13 +263,12 @@ where halve_workers, config, ); - let install_state_hook = bal.is_none(); + let install_state_hook = env.decoded_bal.is_none(); let prewarm_handle = self.spawn_caching_with( env, prewarm_rx, provider_builder, Some(state_root_handle.updates_tx().clone()), - bal, ); PayloadHandle { @@ -291,14 +289,13 @@ where env: ExecutionEnv, transactions: I, provider_builder: StateProviderBuilder, - bal: Option>, ) -> IteratorPayloadHandle where P: BlockReader + StateProviderFactory + StateReader + Clone + 'static, { let (prewarm_rx, execution_rx) = self.spawn_tx_iterator(transactions, env.transaction_count); - let prewarm_handle = self.spawn_caching_with(env, prewarm_rx, provider_builder, None, bal); + let prewarm_handle = self.spawn_caching_with(env, prewarm_rx, provider_builder, None); PayloadHandle { state_root_handle: None, install_state_hook: false, @@ -456,7 +453,7 @@ where level = "debug", target = "engine::tree::payload_processor", skip_all, - fields(bal=%bal.is_some()) + fields(bal=%env.decoded_bal.is_some()) )] fn spawn_caching_with

( &self, @@ -464,7 +461,6 @@ where transactions: mpsc::Receiver<(usize, impl ExecutableTxFor + Clone + Send + 'static)>, provider_builder: StateProviderBuilder, to_sparse_trie_task: Option>, - bal: Option>, ) -> CacheTaskHandle where P: BlockReader + StateProviderFactory + StateReader + Clone + 'static, @@ -475,7 +471,7 @@ where let saved_cache = self.disable_state_cache.not().then(|| self.cache_for(env.parent_hash)); let executed_tx_index = Arc::new(AtomicUsize::new(0)); - + let maybe_decoded_bal = env.decoded_bal.clone(); // configure prewarming let prewarm_ctx = PrewarmContext { env, @@ -496,14 +492,15 @@ where prewarm_ctx, to_sparse_trie_task, ); - { let to_prewarm_task = to_prewarm_task.clone(); self.executor.spawn_blocking_named("prewarm", move || { let mode = if skip_prewarm { PrewarmMode::Skipped - } else if let Some(bal) = bal { - PrewarmMode::BlockAccessList(bal) + } else if let Some(decoded_bal) = maybe_decoded_bal { + PrewarmMode::BlockAccessList(Arc::new( + decoded_bal.as_bal().clone().into_inner(), + )) } else { PrewarmMode::Transactions(transactions) }; @@ -926,7 +923,7 @@ pub struct ExecutionEnv { pub withdrawals: Option>, /// Optional decoded BAL for the block. /// Used to validate and optimize execution. - pub decoded_bal: Option, + pub decoded_bal: Option>, } impl ExecutionEnv @@ -1243,7 +1240,6 @@ mod tests { StateProviderBuilder::new(provider_factory.clone(), genesis_hash, None), OverlayStateProviderFactory::new(provider_factory, ChangesetCache::new()), &TreeConfig::default(), - None, // No BAL for test ); let mut state_hook = handle.state_hook().expect("state hook is None"); diff --git a/crates/engine/tree/src/tree/payload_validator.rs b/crates/engine/tree/src/tree/payload_validator.rs index 8ac77280003..f8bf7ccaa04 100644 --- a/crates/engine/tree/src/tree/payload_validator.rs +++ b/crates/engine/tree/src/tree/payload_validator.rs @@ -491,6 +491,15 @@ where .in_scope(|| self.evm_env_for(&input)) .map_err(NewPayloadError::other)?; + // Extract the BAL, if valid and available + let decoded_bal = ensure_ok!(input + .block_access_list_raw() + .cloned() + .map(DecodedBal::from_rlp_bytes) + .transpose() + .map_err(|err| { Box::::from(err) })) + .map(Arc::new); + let env = ExecutionEnv { evm_env, hash: input.hash(), @@ -499,10 +508,7 @@ where transaction_count: input.transaction_count(), gas_used: input.gas_used(), withdrawals: input.withdrawals().map(|w| w.to_vec()), - decoded_bal: input - .block_access_list_raw() - .cloned() - .and_then(|raw| DecodedBal::from_rlp_bytes(raw).ok()), + decoded_bal, }; // Plan the strategy used for state root computation. @@ -517,14 +523,6 @@ where // Get an iterator over the transactions in the payload let txs = self.tx_iterator_for(&input)?; - // Extract the BAL, if valid and available - let block_access_list = ensure_ok!(input - .block_access_list() - .transpose() - // Eventually gets converted to a `InsertBlockErrorKind::Other` - .map_err(Box::::from)) - .map(Arc::new); - // Create lazy overlay from ancestors - this doesn't block, allowing execution to start // before the trie data is ready. The overlay will be computed on first access. let (lazy_overlay, anchor_hash) = Self::get_parent_lazy_overlay(parent_hash, ctx.state()); @@ -543,7 +541,6 @@ where provider_builder, overlay_factory.clone(), strategy, - block_access_list, )); // Create optional cache stats for detailed block logging @@ -1447,7 +1444,6 @@ where provider_builder: StateProviderBuilder, overlay_factory: OverlayStateProviderFactory

, strategy: StateRootStrategy, - block_access_list: Option>, ) -> Result< PayloadHandle< impl ExecutableTxFor + use, @@ -1467,7 +1463,6 @@ where provider_builder, overlay_factory, &self.config, - block_access_list, ); // record prewarming initialization duration @@ -1480,12 +1475,8 @@ where } StateRootStrategy::Parallel | StateRootStrategy::Synchronous => { let start = Instant::now(); - let handle = self.payload_processor.spawn_cache_exclusive( - env, - txs, - provider_builder, - block_access_list, - ); + let handle = + self.payload_processor.spawn_cache_exclusive(env, txs, provider_builder); // Record prewarming initialization duration self.metrics From ab6e7b5a0679f2be685067ec50f0d281d4b2df99 Mon Sep 17 00:00:00 2001 From: Soubhik Singha Mahapatra Date: Wed, 22 Apr 2026 16:09:05 +0530 Subject: [PATCH 3/8] pass decoded bal in prewarm --- .../tree/src/tree/payload_processor/mod.rs | 4 +--- .../tree/src/tree/payload_processor/prewarm.rs | 6 +++--- .../engine/tree/src/tree/payload_validator.rs | 18 +++++++++++++----- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/crates/engine/tree/src/tree/payload_processor/mod.rs b/crates/engine/tree/src/tree/payload_processor/mod.rs index 40e1b602489..cfb774af102 100644 --- a/crates/engine/tree/src/tree/payload_processor/mod.rs +++ b/crates/engine/tree/src/tree/payload_processor/mod.rs @@ -512,9 +512,7 @@ where } else if let Some(decoded_bal) = maybe_decoded_bal.filter(|_| !disable_bal_parallel_execution) { - PrewarmMode::BlockAccessList(Arc::new( - decoded_bal.as_bal().clone().into_inner(), - )) + PrewarmMode::BlockAccessList(decoded_bal) } else { PrewarmMode::Transactions(transactions) }; diff --git a/crates/engine/tree/src/tree/payload_processor/prewarm.rs b/crates/engine/tree/src/tree/payload_processor/prewarm.rs index 274a0697226..46995011218 100644 --- a/crates/engine/tree/src/tree/payload_processor/prewarm.rs +++ b/crates/engine/tree/src/tree/payload_processor/prewarm.rs @@ -18,7 +18,7 @@ use crate::tree::{ StateProviderBuilder, }; use alloy_consensus::transaction::TxHashRef; -use alloy_eip7928::BlockAccessList; +use alloy_eip7928::{bal::DecodedBal, BlockAccessList}; use alloy_eips::eip4895::Withdrawal; use alloy_primitives::{keccak256, StorageKey, B256}; use crossbeam_channel::Sender as CrossbeamSender; @@ -48,7 +48,7 @@ pub enum PrewarmMode { /// Prewarm by executing transactions from a stream, each paired with its block index. Transactions(Receiver<(usize, Tx)>), /// Prewarm by prefetching slots from a Block Access List. - BlockAccessList(Arc), + BlockAccessList(Arc), /// Transaction prewarming is skipped (e.g. small blocks where the overhead exceeds the /// benefit). No workers are spawned. Skipped, @@ -455,7 +455,7 @@ where self.spawn_txs_prewarm(pending, actions_tx, self.to_sparse_trie_task.clone()); } PrewarmMode::BlockAccessList(bal) => { - self.run_bal_prewarm(bal, actions_tx); + self.run_bal_prewarm(bal.into_bal().into_inner(), actions_tx); } PrewarmMode::Skipped => { let _ = actions_tx diff --git a/crates/engine/tree/src/tree/payload_validator.rs b/crates/engine/tree/src/tree/payload_validator.rs index f8bf7ccaa04..de86cfabe13 100644 --- a/crates/engine/tree/src/tree/payload_validator.rs +++ b/crates/engine/tree/src/tree/payload_validator.rs @@ -491,12 +491,9 @@ where .in_scope(|| self.evm_env_for(&input)) .map_err(NewPayloadError::other)?; - // Extract the BAL, if valid and available + // Extract the decoded BAL, if valid and available. let decoded_bal = ensure_ok!(input - .block_access_list_raw() - .cloned() - .map(DecodedBal::from_rlp_bytes) - .transpose() + .try_decoded_block_access_list() .map_err(|err| { Box::::from(err) })) .map(Arc::new); @@ -2117,6 +2114,17 @@ impl BlockOrPayload { } } + /// Returns the decoded block access list, if present and successfully decoded. + pub fn try_decoded_block_access_list(&self) -> Result, alloy_rlp::Error> { + match self { + Self::Payload(payload) => payload + .block_access_list() + .map(|block_access_list| DecodedBal::from_rlp_bytes(block_access_list.clone())) + .transpose(), + Self::Block(_) => None.transpose(), + } + } + /// Returns the number of transactions in the payload or block. pub fn transaction_count(&self) -> usize where From 08a54e08a1c66ab73dc3a005cae3e8b4d2d0282e Mon Sep 17 00:00:00 2001 From: Soubhik Singha Mahapatra Date: Wed, 22 Apr 2026 16:12:11 +0530 Subject: [PATCH 4/8] pass decoded bal in prewarm --- crates/engine/tree/src/tree/payload_processor/prewarm.rs | 2 +- crates/engine/tree/src/tree/payload_validator.rs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/engine/tree/src/tree/payload_processor/prewarm.rs b/crates/engine/tree/src/tree/payload_processor/prewarm.rs index 46995011218..21c43ad27b8 100644 --- a/crates/engine/tree/src/tree/payload_processor/prewarm.rs +++ b/crates/engine/tree/src/tree/payload_processor/prewarm.rs @@ -455,7 +455,7 @@ where self.spawn_txs_prewarm(pending, actions_tx, self.to_sparse_trie_task.clone()); } PrewarmMode::BlockAccessList(bal) => { - self.run_bal_prewarm(bal.into_bal().into_inner(), actions_tx); + self.run_bal_prewarm(Arc::new(bal.as_bal().into_inner()), actions_tx); } PrewarmMode::Skipped => { let _ = actions_tx diff --git a/crates/engine/tree/src/tree/payload_validator.rs b/crates/engine/tree/src/tree/payload_validator.rs index de86cfabe13..8b16fcf8975 100644 --- a/crates/engine/tree/src/tree/payload_validator.rs +++ b/crates/engine/tree/src/tree/payload_validator.rs @@ -493,7 +493,7 @@ where // Extract the decoded BAL, if valid and available. let decoded_bal = ensure_ok!(input - .try_decoded_block_access_list() + .try_decoded_access_list() .map_err(|err| { Box::::from(err) })) .map(Arc::new); @@ -2115,13 +2115,16 @@ impl BlockOrPayload { } /// Returns the decoded block access list, if present and successfully decoded. - pub fn try_decoded_block_access_list(&self) -> Result, alloy_rlp::Error> { + /// + /// This is kept on [`BlockOrPayload`] so downloaded blocks can eventually surface an optional + /// decoded BAL through the same interface. + pub fn try_decoded_access_list(&self) -> Result, alloy_rlp::Error> { match self { Self::Payload(payload) => payload .block_access_list() .map(|block_access_list| DecodedBal::from_rlp_bytes(block_access_list.clone())) .transpose(), - Self::Block(_) => None.transpose(), + Self::Block(_) => Ok(None), } } From d13d23ffb290052c49d466d743d0ff448de39b45 Mon Sep 17 00:00:00 2001 From: Soubhik Singha Mahapatra Date: Wed, 22 Apr 2026 16:26:22 +0530 Subject: [PATCH 5/8] pass decoded bal in prewarm --- bin/reth-bb/Cargo.toml | 2 +- bin/reth-bench/Cargo.toml | 2 +- bin/reth/Cargo.toml | 2 +- .../src/tree/payload_processor/prewarm.rs | 19 ++++++++++--------- .../engine/tree/src/tree/payload_validator.rs | 8 -------- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/bin/reth-bb/Cargo.toml b/bin/reth-bb/Cargo.toml index e84ab53c607..b58115b1743 100644 --- a/bin/reth-bb/Cargo.toml +++ b/bin/reth-bb/Cargo.toml @@ -66,7 +66,7 @@ eyre.workspace = true [features] default = [ - "jemalloc", + # "jemalloc", "reth-cli-util/jemalloc", "asm-keccak", "min-debug-logs", diff --git a/bin/reth-bench/Cargo.toml b/bin/reth-bench/Cargo.toml index f74e34f7d8b..55ecd52df39 100644 --- a/bin/reth-bench/Cargo.toml +++ b/bin/reth-bench/Cargo.toml @@ -80,7 +80,7 @@ csv.workspace = true [dev-dependencies] [features] -default = ["jemalloc"] +# default = ["jemalloc"] asm-keccak = [ "reth-node-core/asm-keccak", diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index 424f93a5d23..3ed81bf8e0c 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -81,7 +81,7 @@ toml.workspace = true [features] default = [ - "jemalloc", + # "jemalloc", "otlp", "otlp-logs", "reth-revm/portable", diff --git a/crates/engine/tree/src/tree/payload_processor/prewarm.rs b/crates/engine/tree/src/tree/payload_processor/prewarm.rs index 21c43ad27b8..0f34f655da1 100644 --- a/crates/engine/tree/src/tree/payload_processor/prewarm.rs +++ b/crates/engine/tree/src/tree/payload_processor/prewarm.rs @@ -18,7 +18,7 @@ use crate::tree::{ StateProviderBuilder, }; use alloy_consensus::transaction::TxHashRef; -use alloy_eip7928::{bal::DecodedBal, BlockAccessList}; +use alloy_eip7928::bal::DecodedBal; use alloy_eips::eip4895::Withdrawal; use alloy_primitives::{keccak256, StorageKey, B256}; use crossbeam_channel::Sender as CrossbeamSender; @@ -331,9 +331,10 @@ where #[instrument(level = "debug", target = "engine::tree::payload_processor::prewarm", skip_all)] fn run_bal_prewarm( &self, - bal: Arc, + decoded_bal: Arc, actions_tx: Sender>, ) { + let bal = decoded_bal.as_bal(); if bal.is_empty() { if let Some(to_sparse_trie_task) = self.to_sparse_trie_task.as_ref() { let _ = to_sparse_trie_task.send(StateRootMessage::FinishedStateUpdates); @@ -355,8 +356,8 @@ where let parent_span = Span::current(); let prefetch_parent_span = parent_span.clone(); let stream_parent_span = parent_span; - let prefetch_bal = Arc::clone(&bal); - let stream_bal = Arc::clone(&bal); + let prefetch_bal = Arc::clone(&decoded_bal); + let stream_bal = Arc::clone(&decoded_bal); let (prefetch_tx, prefetch_rx) = oneshot::channel(); let (stream_tx, stream_rx) = oneshot::channel(); @@ -367,12 +368,12 @@ where target: "engine::tree::payload_processor::prewarm", parent: &prefetch_parent_span, "bal_prefetch_storage", - bal_accounts = prefetch_bal.len(), + bal_accounts = prefetch_bal.as_bal().len(), ); let provider_parent_span = branch_span.clone(); let _span = branch_span.entered(); - prefetch_bal.par_iter().for_each_init( + prefetch_bal.as_bal().par_iter().for_each_init( || { ( prefetch_ctx.clone(), @@ -400,12 +401,12 @@ where target: "engine::tree::payload_processor::prewarm", parent: &stream_parent_span, "bal_hashed_state_stream", - bal_accounts = stream_bal.len(), + bal_accounts = stream_bal.as_bal().len(), ); let provider_parent_span = branch_span.clone(); let _span = branch_span.entered(); - stream_bal.par_iter().for_each_init( + stream_bal.as_bal().par_iter().for_each_init( || (ctx.clone(), None::>, provider_parent_span.clone()), |(ctx, provider, parent_span), account_changes| { ctx.send_bal_hashed_state( @@ -455,7 +456,7 @@ where self.spawn_txs_prewarm(pending, actions_tx, self.to_sparse_trie_task.clone()); } PrewarmMode::BlockAccessList(bal) => { - self.run_bal_prewarm(Arc::new(bal.as_bal().into_inner()), actions_tx); + self.run_bal_prewarm(bal, actions_tx); } PrewarmMode::Skipped => { let _ = actions_tx diff --git a/crates/engine/tree/src/tree/payload_validator.rs b/crates/engine/tree/src/tree/payload_validator.rs index 8b16fcf8975..294caaba5af 100644 --- a/crates/engine/tree/src/tree/payload_validator.rs +++ b/crates/engine/tree/src/tree/payload_validator.rs @@ -2106,14 +2106,6 @@ impl BlockOrPayload { } } - /// Returns the raw rlp block access list embedded in a payload, if present. - pub fn block_access_list_raw(&self) -> Option<&Bytes> { - match self { - Self::Payload(payload) => payload.block_access_list(), - Self::Block(_) => None, - } - } - /// Returns the decoded block access list, if present and successfully decoded. /// /// This is kept on [`BlockOrPayload`] so downloaded blocks can eventually surface an optional From 2ad9fe2853c41f56cf14872434e9e1fc700f2972 Mon Sep 17 00:00:00 2001 From: Soubhik Singha Mahapatra Date: Wed, 22 Apr 2026 16:26:56 +0530 Subject: [PATCH 6/8] fmt --- bin/reth-bb/Cargo.toml | 2 +- bin/reth-bench/Cargo.toml | 2 +- bin/reth/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/reth-bb/Cargo.toml b/bin/reth-bb/Cargo.toml index b58115b1743..e84ab53c607 100644 --- a/bin/reth-bb/Cargo.toml +++ b/bin/reth-bb/Cargo.toml @@ -66,7 +66,7 @@ eyre.workspace = true [features] default = [ - # "jemalloc", + "jemalloc", "reth-cli-util/jemalloc", "asm-keccak", "min-debug-logs", diff --git a/bin/reth-bench/Cargo.toml b/bin/reth-bench/Cargo.toml index 55ecd52df39..f74e34f7d8b 100644 --- a/bin/reth-bench/Cargo.toml +++ b/bin/reth-bench/Cargo.toml @@ -80,7 +80,7 @@ csv.workspace = true [dev-dependencies] [features] -# default = ["jemalloc"] +default = ["jemalloc"] asm-keccak = [ "reth-node-core/asm-keccak", diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index 3ed81bf8e0c..424f93a5d23 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -81,7 +81,7 @@ toml.workspace = true [features] default = [ - # "jemalloc", + "jemalloc", "otlp", "otlp-logs", "reth-revm/portable", From 8011429d5a085bab65bc52c605cc5df6abc443a7 Mon Sep 17 00:00:00 2001 From: Soubhik Singha Mahapatra Date: Wed, 22 Apr 2026 16:30:24 +0530 Subject: [PATCH 7/8] fmt --- crates/engine/tree/src/tree/payload_validator.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/engine/tree/src/tree/payload_validator.rs b/crates/engine/tree/src/tree/payload_validator.rs index 294caaba5af..bf7a49aa3d8 100644 --- a/crates/engine/tree/src/tree/payload_validator.rs +++ b/crates/engine/tree/src/tree/payload_validator.rs @@ -59,7 +59,6 @@ use alloy_primitives::{map::B256Set, B256}; use reth_trie_sparse::debug_recorder::TrieDebugRecorder; use crate::tree::payload_processor::receipt_root_task::{IndexedReceipt, ReceiptRootTaskHandle}; -use alloy_primitives::Bytes; use reth_chain_state::{ CanonicalInMemoryState, DeferredTrieData, ExecutedBlock, ExecutionTimingStats, LazyOverlay, }; From ac48d9d65fa29a32ad52d05f9193cdaaa9161bca Mon Sep 17 00:00:00 2001 From: Soubhik Singha Mahapatra Date: Thu, 23 Apr 2026 10:49:07 +0530 Subject: [PATCH 8/8] comments --- crates/engine/tree/src/tree/payload_validator.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/engine/tree/src/tree/payload_validator.rs b/crates/engine/tree/src/tree/payload_validator.rs index bf7a49aa3d8..0de28226b42 100644 --- a/crates/engine/tree/src/tree/payload_validator.rs +++ b/crates/engine/tree/src/tree/payload_validator.rs @@ -2106,9 +2106,6 @@ impl BlockOrPayload { } /// Returns the decoded block access list, if present and successfully decoded. - /// - /// This is kept on [`BlockOrPayload`] so downloaded blocks can eventually surface an optional - /// decoded BAL through the same interface. pub fn try_decoded_access_list(&self) -> Result, alloy_rlp::Error> { match self { Self::Payload(payload) => payload