From 1ed7450d53b751383822c7836b0ae2ff10d6b2f7 Mon Sep 17 00:00:00 2001 From: Femi Bankole Date: Wed, 20 Aug 2025 19:01:00 +0100 Subject: [PATCH] feat(engine): set default_memory_block_buffer_target to zero (#17963) --- crates/engine/primitives/src/config.rs | 2 +- docs/vocs/docs/pages/cli/reth/node.mdx | 2 +- docs/vocs/docs/pages/sdk/examples/standalone-components.mdx | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/engine/primitives/src/config.rs b/crates/engine/primitives/src/config.rs index ccff97bc06..0ddc35453a 100644 --- a/crates/engine/primitives/src/config.rs +++ b/crates/engine/primitives/src/config.rs @@ -4,7 +4,7 @@ pub const DEFAULT_PERSISTENCE_THRESHOLD: u64 = 2; /// How close to the canonical head we persist blocks. -pub const DEFAULT_MEMORY_BLOCK_BUFFER_TARGET: u64 = 2; +pub const DEFAULT_MEMORY_BLOCK_BUFFER_TARGET: u64 = 0; /// Default maximum concurrency for proof tasks pub const DEFAULT_MAX_PROOF_TASK_CONCURRENCY: u64 = 256; diff --git a/docs/vocs/docs/pages/cli/reth/node.mdx b/docs/vocs/docs/pages/cli/reth/node.mdx index 1ac8338416..a4d3ec1200 100644 --- a/docs/vocs/docs/pages/cli/reth/node.mdx +++ b/docs/vocs/docs/pages/cli/reth/node.mdx @@ -786,7 +786,7 @@ Engine: --engine.memory-block-buffer-target Configure the target number of blocks to keep in memory - [default: 2] + [default: 0] --engine.legacy-state-root Enable legacy state root diff --git a/docs/vocs/docs/pages/sdk/examples/standalone-components.mdx b/docs/vocs/docs/pages/sdk/examples/standalone-components.mdx index 8b77913f53..9093858c6c 100644 --- a/docs/vocs/docs/pages/sdk/examples/standalone-components.mdx +++ b/docs/vocs/docs/pages/sdk/examples/standalone-components.mdx @@ -80,9 +80,8 @@ let factory = EthereumNode::provider_factory_builder() Reth buffers new blocks in memory before persisting them to disk for performance optimization. If your external process needs immediate access to the latest blocks, configure the node to persist blocks immediately: - `--engine.persistence-threshold 0` - Persists new canonical blocks to disk immediately -- `--engine.memory-block-buffer-target 0` - Disables in-memory block buffering -Use both flags together to ensure external processes can read new blocks without delay. +Using this flag ensures external processes can read new blocks without delay. As soon as the reth process has persisted the block data, the external reader can read it from the database.