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

Integrate OnStateHook in executor #11330

Closed
Tracked by #11169
mattsse opened this issue Sep 30, 2024 · 0 comments · Fixed by #11345
Closed
Tracked by #11169

Integrate OnStateHook in executor #11330

mattsse opened this issue Sep 30, 2024 · 0 comments · Fixed by #11345
Assignees
Labels
A-execution Related to the Execution and EVM C-enhancement New feature or request

Comments

@mattsse
Copy link
Collaborator

mattsse commented Sep 30, 2024

This should unblock #11161

with #11068 we can now hook into state updates on system calls, we also need this for all txs in the executor.

this can be achieved by also introducing the hook generic on the executor types, similar to what we did with:

/// Executes the EVM with the given input and accepts a witness closure that is invoked with the
/// EVM state after execution.
fn execute_with_state_witness<F>(
self,
input: Self::Input<'_>,
witness: F,
) -> Result<Self::Output, Self::Error>
where
F: FnMut(&State<DB>);

but accepting a OnStateHook instance.

then we'd also need to call the hook before we commit the regular txs

evm.db_mut().commit(state);

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-enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants