Skip to content

Conversation

@shekhirin
Copy link
Collaborator

Adds an ability to disable cached state provider by passing --engine.disable-state-cache CLI argument.

@shekhirin shekhirin added the C-enhancement New feature or request label Dec 5, 2025
@shekhirin shekhirin added the A-cli Related to the reth CLI label Dec 5, 2025
@shekhirin shekhirin added the A-engine Related to the engine implementation label Dec 5, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Dec 5, 2025
}

/// Setter for whether to disable state cache.
pub const fn without_state_cache(mut self, disable_state_cache: bool) -> Self {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without is weird to me but i see its used by others as well

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Dec 5, 2025
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt this still handle cache updates after execution?

@shekhirin shekhirin force-pushed the alexey/engine-disable-state-cache branch from 02f8aa0 to b82afb8 Compare December 5, 2025 18:49
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@yongkangc yongkangc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@shekhirin shekhirin requested a review from rakita as a code owner December 6, 2025 12:48
@shekhirin shekhirin force-pushed the alexey/engine-disable-state-cache branch 3 times, most recently from c58b06a to b82afb8 Compare December 6, 2025 14:32
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels a bit messy

how does prewarm behave if caching is disabled?

should we even do prewarm if we don't make use of the shared cache or only for the proof prep?

Comment on lines +282 to +283
let elapsed = start.elapsed();
debug!(target: "engine::caching", parent_hash=?hash, elapsed=?elapsed, "Updated execution cache");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are now misleading if there's no cache

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's gated behind if let Some(saved_cache) = saved_cache which is triggered only if we use state cache

@shekhirin
Copy link
Collaborator Author

@mattsse prewarm is used for proofs even without the state cache, yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Related to the reth CLI A-engine Related to the engine implementation C-enhancement New feature or request

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

6 participants