scroll-tech / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
8 stars 3 forks source link

Scroll `EvmExecutor` implementation #5

Open frisitano opened 1 month ago

frisitano commented 1 month ago

Describe the feature

Overview

To execute blocks using scroll-revm we must implement an EvmExecutor (and associated assets) that wraps scroll-revm and executes blocks. An example of optimism specific Executor assets can be found here. Logic from the stateless-block-verifier can be used as a guide for the block execution logic.

Additional context

No response

Thegaram commented 1 month ago

It seems there is no EvmExecutor trait yet. Do you mean we should define a ScrollEvmExecutor<EvmConfig> that implements execute_state_transitions, as well as ScrollBlockExecutor etc, following the Eth and Op examples?

frisitano commented 1 month ago

Sorry I should have been explicit when referring to what we need to implement. Here is an example of the OpEvmExecutor. We would also need to implement associated types such as OpBlockExecutor , OpBatchExecutor, OpExecutorProvider and implement the required traits on these types, i.e. Executor, BatchExecutor and BlockExecutorProvider respectively.