perf(engine): txpool prewarming#26378
Conversation
|
cyclops audit |
|
cc @shekhirin Cyclops audit event published. View workflow run Config: config: |
tempoxyz-bot
left a comment
There was a problem hiding this comment.
👁️ Cyclops Review — No actionable findings.
The parent-state read invariant was traced through REVM execution, snapshot publication, payload validation, and the BAL state-root consumer. Speculative writes remain isolated in REVM state, and the current validator path only attaches snapshots tagged for the payload parent.
Reviewer Callouts
- ⚡ Per-parent cache growth and retained high-water allocation (
crates/engine/execution-cache/src/txpool.rs:26-30,crates/engine/tree/src/tree/txpool_prewarm.rs:514-519,crates/engine/tree/src/tree/txpool_prewarm.rs:628-632): Refresh limits do not cap unique state entries accumulated during one parent; each wave clones the full maps, andclear()retains capacity. Please confirm memory and clone cost under a long head stall plus txpool churn, or add an entry/byte budget. - ⚡ Synchronous Engine API wait (
crates/engine/tree/src/tree/txpool_prewarm.rs:322-325,crates/engine/tree/src/tree/txpool_prewarm.rs:800-805,crates/engine/tree/src/tree/mod.rs:1760-1769):RethNewPayloadcan wait through the current gas-bounded EVM transaction because cancellation is checked between transactions. Please confirm this fits the latency budget. - ⚡ Attributes-free FCU error propagation (
crates/engine/tree/src/tree/mod.rs:1269-1277): Enabling canonical-head notifications makes an already-canonical FCU without payload attributes perform a fallible header lookup and propagate its error. Confirm that the opt-in performance feature should alter this hot-path behavior; otherwise make notification failure best-effort. - ⚡ Future snapshot concurrency (
crates/engine/execution-cache/src/txpool.rs:33-43): The three maps are cloned under independent locks. The current single-writer wave boundary is safe, but preserve/enforce quiescence or add aggregate synchronization before parallelizing cache writers.
13c289a to
b58e867
Compare
24319ab to
57332d5
Compare
|
cyclops audit |
|
cc @pepyakin Cyclops audit event published. View workflow run Config: config: |
👁️ Cyclops Security Review
🧭 Verifying · mode=
Findings
⚙️ Controls
📜 26 events🔍 |
75062ab to
e7192f4
Compare
a95fcd2 to
724b684
Compare
|
derek bench mode=rpc metrics=true |
Removes the ConfigureEvm::txpool_prewarm_env hook whose Ok(None) default made txpool prewarming a silent no-op for non-ethereum nodes. The worker now reuses the canonical head's own EVM env and additionally disables the basefee check: the predicted attributes were mocked anyway, and fee viability is the pool's concern, not the warmer's. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the hand-rolled read-through cache and its EvmStateProvider wrapper with reth-revm's CachedReads, layered under revm State via as_db_mut. The published snapshot keeps its lookup API but wraps Arc<CachedReads>, so cache-tier consumers are unchanged. Publication is gated on entry-count growth, which replaces the dirty flag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
c160707 to
d1672b5
Compare
mattsse
left a comment
There was a problem hiding this comment.
One configuration guard to add.
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
No description provided.