Skip to content

fix(reth-cli): keep reth default memory block buffer target (v1.5.5) - #6486

Merged
0x00101010 merged 1 commit into
releases/v1.5.5from
fix/engine-default-memory-buffer-target-v1.5.5
Nov 6, 2026
Merged

0x00101010 merged 1 commit into
releases/v1.5.5from
fix/engine-default-memory-buffer-target-v1.5.5

Conversation

@0x00101010

Copy link
Copy Markdown
Contributor

Why

Backport of the main fix to releases/v1.5.5. v1.5.4 (#6464) raised --engine.memory-block-buffer-target from reth's 5 to 70. RPC state reads walk the in-memory blocks one at a time before hitting the database (no index across blocks), so a 70-block buffer makes eth_call slower. Alchemy measured this after upgrading to v1.5.4:

  • Base Sepolia eth_call: average went from 0.22 ms to 0.40 ms, p95 from 2 ms to 3 ms.
  • On mainnet, one customer call shape had p999 go from 298 ms to 445 ms.

The buffer target isn't what fixed the Denim stalls. The fix came from raising the backpressure threshold from 16 to 160, and that change stays.

What

  • Drop the MEMORY_BLOCK_BUFFER_TARGET override, so reth's default of 5 applies.
  • Keep persistence threshold 70 and backpressure 160. Reth base-v2.5.2.11 has no state masking, so validation passes (5 <= 70, 160 > 70).
v1.5.4 this PR
Persistence threshold 70 70
Memory block buffer target 70 5 (reth default)
Backpressure 160 160
Blocks written per flush ~1 ~65
In-memory blocks after a flush 70 5

Notes

  • Flushes get bigger, from about 1 block to about 65. Across the fleet over the last day, a save averaged 67 ms for 1.29 blocks, so the cost is mostly per save. The engine stalls only if a flush outlasts about 94 blocks (~19s): it starts at 71 blocks in memory and stalls at 165 (5 + 160).
  • Operators who pass --engine.memory-block-buffer-target explicitly are unaffected.

Evidence

Verified How Result
Effective defaults pass reth validation on reth 2.5 cargo test -p base-reth-cli (engine_defaults_scale_for_denim_blocks) threshold 70, buffer 5, backpressure 160, validate() ok
Lint and format cargo clippy -p base-reth-cli --all-targets -D warnings, cargo +nightly fmt --check clean

@depot-code-access

depot-code-access Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

✅ All benchmarks green — 14 within ±2% (deterministic instruction counts). View run

Benchmark details (14)
Benchmark Base (target) Head (this PR) Δ instructions
batch_queue/drain/drain_cached_span_batches 242,027 242,027 +0.0%
batch_transaction/encode_in_place/encode_in_place 4,199,759 4,199,759 +0.0%
batch_transaction/temporary_frame_buffers/temporary_frame_buffers 8,408,350 8,408,350 +0.0%
flashblock_decode/decode/brotli 3,296,484 3,296,484 +0.0%
flashblock_decode/decode/plain_json 2,280,194 2,280,194 +0.0%
flz/compress_len/real_contract_call 43,148 43,148 +0.0%
flz/compress_len/synthetic_0 38,205 38,205 +0.0%
flz/compress_len/synthetic_1 54,682 54,682 +0.0%
flz/compress_len/synthetic_2 147,976 147,976 +0.0%
flz/data_gas 43,059 43,059 +0.0%
flz/tx_estimated_size 43,056 43,056 +0.0%
frame_parse/decode/single_4kib 1,031 1,031 +0.0%
frame_parse/parse_frames/few_large 1,053,062 1,053,062 +0.0%
frame_parse/parse_frames/many_small 154,763 154,763 +0.0%

@depot-code-access

Copy link
Copy Markdown

Acceptance Tests: ✅ Passed

3/3 checks passed · Checks & reports

Acceptance report
  • smoke / chain-identity — passed: chain identity matched
    • Expected: 84538453
    • Observed: 84538453
  • smoke / production — passed: head advanced
    • Expected: {"minimum_blocks":3}
    • Observed: {"delta":3,"from":5,"last":8,"required_delta":3}
  • smoke / validator-converges — passed: heads converged on a common canonical block
    • Expected: {"common_height_hash":true,"max_lag_blocks":5}
    • Observed: {"common_height":8,"hash":"0xedb16ea7e2f33380df3e08b4e7bbc4132253872d97b2ce3afd2f729599f468c1","high":8,"lag":0,"low":8,"low_timestamp":1793994374,"maximum_lag":5,"minimum_timestamp":0}

@0x00101010
0x00101010 merged commit c97f570 into releases/v1.5.5 Nov 6, 2026
34 checks passed
@0x00101010
0x00101010 deleted the fix/engine-default-memory-buffer-target-v1.5.5 branch November 6, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants