Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit prune_modes argument for the BatchExecutor #9173

Closed
shekhirin opened this issue Jun 28, 2024 · 2 comments · Fixed by #9176
Closed

Revisit prune_modes argument for the BatchExecutor #9173

shekhirin opened this issue Jun 28, 2024 · 2 comments · Fixed by #9176
Assignees
Labels
A-execution Related to the Execution and EVM C-debt Refactor of code section that is hard to understand or maintain

Comments

@shekhirin
Copy link
Collaborator

Describe the feature

This API is weird because prune_modes feels out of place in it

/// The pruning modes are used to determine which parts of the state should be kept during
/// execution.
fn batch_executor<DB>(&self, db: DB, prune_modes: PruneModes) -> Self::BatchExecutor<DB>

Additional context

No response

@shekhirin shekhirin added C-debt Refactor of code section that is hard to understand or maintain A-execution Related to the Execution and EVM labels Jun 28, 2024
@mattsse
Copy link
Collaborator

mattsse commented Jun 28, 2024

this is only needed for the execution stage and imo it would be more appropriate if this is applied on the batch output and not handled by the executor.

the tmp mem overhead for full node sync is negligible imo

@shekhirin
Copy link
Collaborator Author

What if we just have a separate method that sets the prune modes? Like this one

/// Set the expected tip of the batch.
///
/// This can be used to optimize state pruning during execution.
fn set_tip(&mut self, tip: BlockNumber);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-execution Related to the Execution and EVM C-debt Refactor of code section that is hard to understand or maintain
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants