pub struct EngineArgs {Show 35 fields
pub persistence_threshold: u64,
pub persistence_backpressure_threshold: Option<u64>,
pub num_state_masking_blocks: u64,
pub memory_block_buffer_target: Option<u64>,
pub backfill_run_threshold: u64,
pub invalid_header_hit_eviction_threshold: u8,
pub state_cache_disabled: bool,
pub prewarming_disabled: bool,
pub txpool_prewarming_enabled: bool,
pub sender_recovery_cache_enabled: bool,
pub state_provider_metrics: bool,
pub cross_block_cache_size: usize,
pub accept_execution_requests_hash: bool,
pub multiproof_chunk_size: usize,
pub reserved_cpu_cores: usize,
pub cpu_cores: Option<NonZero<usize>>,
pub precompile_cache_disabled: bool,
pub state_root_fallback: bool,
pub always_process_payload_attributes_on_canonical_head: bool,
pub allow_unwind_canonical_header: bool,
pub storage_worker_count: Option<usize>,
pub account_worker_count: Option<usize>,
pub prewarming_threads: Option<usize>,
pub cache_metrics_disabled: bool,
pub slow_block_threshold: Option<Duration>,
pub disable_sparse_trie_cache_pruning: bool,
pub state_root_task_timeout: Option<Duration>,
pub share_execution_cache_with_payload_builder: bool,
pub share_sparse_trie_with_payload_builder: bool,
pub suppress_persistence_during_build: bool,
pub bal_parallel_execution_disabled: bool,
pub bal_parallel_state_root_disabled: bool,
pub disable_bal_batch_io: bool,
pub prewarm_reuse: bool,
pub proof_jitter: Option<Duration>,
}Expand description
Parameters for configuring the engine driver.
Fields§
§persistence_threshold: u64Configure persistence threshold for the engine. This determines how many canonical blocks must be in-memory, ahead of the last persisted block, before flushing canonical blocks to disk again.
To persist blocks as fast as the node receives them, set this value to zero. This disables state masking and causes more frequent DB writes.
persistence_backpressure_threshold: Option<u64>Configure the maximum number of blocks beyond the in-memory buffer target that may await persistence before engine API processing stalls.
If omitted, this defaults to the larger of the minimum backpressure threshold and twice
--engine.persistence-threshold.
This value must be greater than --engine.persistence-threshold.
num_state_masking_blocks: u64Configure how many of the blocks being persisted should only mask state/trie writes instead of durably persisting their state/trie updates in the current cycle.
memory_block_buffer_target: Option<u64>Configure how many of the most recent canonical blocks persistence leaves in memory.
When more than --engine.persistence-threshold canonical blocks are held in memory, the
engine writes the canonical chain to disk up to head - memory-block-buffer-target. The
blocks above that height are kept only in memory, so a reorg of them does not unwind the
database. With state masking enabled, the --engine.num-state-masking-blocks blocks below
that height also stay in memory until a later cycle persists their state/trie updates.
This is also the in-memory buffer that --engine.persistence-backpressure-threshold is
measured from.
If omitted, this defaults to the lesser of --engine.persistence-threshold and the
configured default memory block buffer target. The value must not exceed
--engine.persistence-threshold, and with state masking enabled, its sum with
--engine.num-state-masking-blocks must be less than --engine.persistence-threshold.
backfill_run_threshold: u64Configure the largest gap, in blocks, between the local head and the forkchoice head that is closed by downloading the missing blocks directly. Larger gaps trigger a full pipeline (backfill) run instead.
On chains with short block times a pipeline run may take longer than it takes the chain to produce another gap of this size, in which case raising this value lets the node catch up via live sync. Values above 1024 are clamped to the peer header response limit.
invalid_header_hit_eviction_threshold: u8Configure how many cache hits an invalid header can accumulate before it is evicted and reprocessed.
Set to 0 to effectively disable the cache because entries are evicted on the first
lookup.
state_cache_disabled: boolDisable state cache
prewarming_disabled: boolDisable parallel prewarming
txpool_prewarming_enabled: boolEnable best-effort txpool transaction prewarming between payloads.
sender_recovery_cache_enabled: boolCache recovered transaction senders across transaction ingress and payload execution.
Enabled by default, use --engine.sender-recovery-cache=false to disable it.
state_provider_metrics: boolEnable state provider latency metrics. This allows the engine to collect and report stats about how long state provider calls took during execution, but this does introduce slight overhead to state provider calls.
cross_block_cache_size: usizeConfigure the size of cross-block cache in megabytes
accept_execution_requests_hash: boolEnables accepting requests hash instead of an array of requests in engine_newPayloadV4.
multiproof_chunk_size: usizeMultiproof task chunk size for proof targets.
reserved_cpu_cores: usizeConfigure the number of reserved CPU cores for non-reth processes
cpu_cores: Option<NonZero<usize>>Override the available CPU count for node thread pools and parallel execution decisions. Does not change CPU affinity. Explicit thread counts take precedence.
precompile_cache_disabled: boolDisable precompile cache
state_root_fallback: boolEnable state root fallback, useful for testing
always_process_payload_attributes_on_canonical_head: boolAlways process payload attributes and begin a payload build process even if
forkchoiceState.headBlockHash is already the canonical head or an ancestor. See
TreeConfig::always_process_payload_attributes_on_canonical_head for more details.
Note: This is a no-op on OP Stack.
allow_unwind_canonical_header: boolAllow unwinding canonical header to ancestor during forkchoice updates.
See TreeConfig::unwind_canonical_header for more details.
storage_worker_count: Option<usize>Configure the number of storage proof workers spawned for each block. If not specified or zero, the count is derived from the block: 2x available parallelism, halved for blocks with few transactions and doubled for blocks at or above 100M gas.
account_worker_count: Option<usize>Configure the number of account proof workers spawned for each block. If not specified or zero, the count is derived from the block the same way as for storage workers.
prewarming_threads: Option<usize>Configure the number of prewarming threads. If not specified, defaults to available parallelism.
cache_metrics_disabled: boolDisable cache metrics recording, which can take up to 50ms with large cached state.
slow_block_threshold: Option<Duration>Configure the slow block logging threshold in milliseconds.
When set, blocks that take longer than this threshold to execute will be logged with detailed metrics including timing, state operations, and cache statistics.
Set to 0 to log all blocks (useful for debugging/profiling).
When not set, slow block logging is disabled (default).
disable_sparse_trie_cache_pruning: boolFully disable sparse trie cache pruning. When set, the cached sparse trie is preserved without any node pruning or storage trie eviction between blocks. Useful for benchmarking the effects of retaining the full trie cache.
state_root_task_timeout: Option<Duration>Configure the timeout for the state root task before spawning a sequential fallback. If the state root task takes longer than this, a sequential computation starts in parallel and whichever finishes first is used.
–engine.state-root-task-timeout 4s –engine.state-root-task-timeout 400ms
Set to 0s to disable.
Whether to share execution cache with the payload builder.
When enabled, each payload job will get an instance of cross-block execution cache from the engine.
Note: this should only be enabled if node would not be requested to process any payloads in parallel with payload building.
Whether to share the sparse trie with the payload builder.
Replaces the payload builder’s blocking state_root_with_updates() call with the
sparse trie, computing the state root concurrently with transaction execution.
The engine and payload builder contend for the same trie — if a builder task is
still running when newPayload arrives, the engine will block until the trie is
stored back.
The builder also anchors the trie at the built block’s state root, so if the next
newPayload is not on top of that block, the trie cache is invalidated and cleared.
suppress_persistence_during_build: boolSuppress persistence while building a payload.
When enabled, persistence cycles are deferred while a payload build is active. Useful on chains with short block times where persistence I/O can interfere with block building latency.
bal_parallel_execution_disabled: boolDisable BAL (Block Access List, EIP-7928) based parallel execution.
bal_parallel_state_root_disabled: boolDisable BAL-driven parallel state root computation. This is only valid together with
--engine.disable-bal-parallel-execution.
disable_bal_batch_io: boolDisable BAL (Block Access List) storage prefetch IO during prewarming. When set, BAL storage slots are not read into the execution cache.
prewarm_reuse: boolReuse transaction prewarming results during block execution instead of executing transactions again when their prewarm reads are still valid.
proof_jitter: Option<Duration>trie-debug only.Add random jitter before each proof computation (trie-debug only). Each proof worker sleeps for a random duration up to this value before starting work. Useful for stress-testing timing-sensitive proof logic.
–engine.proof-jitter 100ms –engine.proof-jitter 1s
Implementations§
Source§impl EngineArgs
impl EngineArgs
Sourcepub const fn num_state_masking_blocks(&self) -> u64
pub const fn num_state_masking_blocks(&self) -> u64
Returns the effective state masking window, disabled when persistence is immediate.
Sourcepub fn memory_block_buffer_target(&self) -> u64
pub fn memory_block_buffer_target(&self) -> u64
Returns the effective memory block buffer target.
Sourcepub fn persistence_backpressure_threshold(&self) -> u64
pub fn persistence_backpressure_threshold(&self) -> u64
Returns the effective persistence backpressure threshold.
Sourcepub fn tree_config(&self) -> TreeConfig
pub fn tree_config(&self) -> TreeConfig
Creates a TreeConfig from the engine arguments.
Trait Implementations§
Source§impl Args for EngineArgs
impl Args for EngineArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Clone for EngineArgs
impl Clone for EngineArgs
Source§fn clone(&self) -> EngineArgs
fn clone(&self) -> EngineArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EngineArgs
impl Debug for EngineArgs
Source§impl Default for EngineArgs
impl Default for EngineArgs
Source§fn default() -> EngineArgs
fn default() -> EngineArgs
impl Eq for EngineArgs
Source§impl FromArgMatches for EngineArgs
impl FromArgMatches for EngineArgs
Source§fn from_arg_matches(
__clap_arg_matches: &ArgMatches,
) -> Result<EngineArgs, Error>
fn from_arg_matches( __clap_arg_matches: &ArgMatches, ) -> Result<EngineArgs, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<EngineArgs, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<EngineArgs, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl PartialEq for EngineArgs
impl PartialEq for EngineArgs
impl StructuralPartialEq for EngineArgs
Auto Trait Implementations§
impl Freeze for EngineArgs
impl RefUnwindSafe for EngineArgs
impl Send for EngineArgs
impl Sync for EngineArgs
impl Unpin for EngineArgs
impl UnsafeUnpin for EngineArgs
impl UnwindSafe for EngineArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].impl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 208 bytes