Skip to content

feat: executor warm-up cache config - #2628

Draft
carneiro-cw wants to merge 3 commits into
mainfrom
noop
Draft

feat: executor warm-up cache config#2628
carneiro-cw wants to merge 3 commits into
mainfrom
noop

Conversation

@carneiro-cw

@carneiro-cw carneiro-cw commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

PR Type

Enhancement


Description

  • Add warmup_cache flag to ExecutorConfig

  • Implement NoopOutput for cache warming

  • Run noop call on warmup in Executor

  • Refactor imports to evm::types path


Diagram Walkthrough

flowchart LR
  Config["ExecutorConfig<br/>warmup_cache flag"] --> Executor["Executor struct<br/>warmup_cache field"]
  Executor --> WarmupCall["Local call<br/>NoopOutput"] --> MainExec["Main execution"]
Loading

File Walkthrough

Relevant files
Configuration changes
1 files
config.rs
Add warmup_cache flag to ExecutorConfig                                   
+5/-0     
Enhancement
5 files
mod.rs
Export NoopOutput in types module                                               
+1/-0     
mod.rs
Include noop module in output                                                       
+1/-0     
noop.rs
Add NoopOutput type implementation                                             
+15/-0   
mod.rs
Implement cache warmup in Executor                                             
+18/-7   
call_input.rs
Add From for CallInput                                 
+12/-0   
Refactoring
11 files
mod.rs
Update EVM types import paths                                                       
+2/-2     
server.rs
Update executor output imports paths                                         
+3/-3     
error.rs
Update TransactionExecutionInput import path                         
+1/-1     
rocks_state.rs
Update EVM types imports in tests                                               
+2/-2     
transaction_mined.rs
Update transaction execution types imports                             
+2/-2     
stratus_storage.rs
Update TransactionExecution imports in storage                     
+2/-2     
transaction.rs
Update TransactionExecutionInput import                                   
+1/-1     
transaction_input.rs
Update TransactionExecutionInput import path                         
+1/-1     
transaction_stage.rs
Update TransactionExecutionOutput import path                       
+1/-1     
metrics_types.rs
Update EvmKind import path                                                             
+1/-1     
mod.rs
Update EvmKind import in metrics                                                 
+1/-1     

@github-actions

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Error Logging

The warmup cache error log uses the generic field name err. To comply with structured tracing requirements, log the original error in a field named reason (e.g., warn!(reason=?err, "failed to warmup the cache")).

if self.warmup_cache {
    self.execute_local_call::<NoopOutput>(tx.clone().into(), PointInTime::Latest)
        .inspect_err(|err| tracing::warn!(?err, "failed to warmup the cache"))
        .ok();

@github-actions

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Use idiomatic error handling

Use an explicit if let Err for error handling instead of chaining inspect_err and
ok(). This is more idiomatic and clearer about swallowing errors.

src/eth/executor/mod.rs [296-300]

 if self.warmup_cache {
-    self.execute_local_call::<NoopOutput>(tx.clone().into(), PointInTime::Latest)
-        .inspect_err(|err| tracing::warn!(?err, "failed to warmup the cache"))
-        .ok();
+    if let Err(err) = self.execute_local_call::<NoopOutput>(tx.clone().into(), PointInTime::Latest) {
+        tracing::warn!(?err, "failed to warm up the cache");
+    }
 }
Suggestion importance[1-10]: 5

__

Why: Replacing inspect_err(...).ok() with if let Err(err) improves clarity and idiomatic error handling without affecting behavior.

Low

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.

1 participant