Closed Rjected closed 1 month ago
debug_executionWitness
currently needs to output all state required to execute the given block. The endpoint currently does not work for optimism because it needs to use the optimism executor, and the eth mainnet system calls may be different from optimism. It also needs to retain more execution-related information than is desired for the vanilla executor.The
debug_executionWitness
endpointThe endpoint needs to return the following information:
all state that was accessed or changed during block execution
- including system calls and transactions
- all code loaded during execution
- merkle proofs for the state accessed / changed during block execution
We need to leave the current executor as-is, so we don't do more than needed during regular block processing.
A new executor
So, we now have the
BlockAccessListExecutor
, which implements theExecutor
trait:This is a new executor that retains the accessed state in the
BundleState
of theBlockExecutionOutput
. There is also one for optimism. This separate executor meets all requirements for the endpoint, but we still need to make this executor accessible to the RPC endpoint.Executors in RPC
We currently have the
BlockExecutorProvider
, which provides multiple types of executors for RPC to use:This PR includes a third type of executor to include in the
BlockExecutorProvider
trait: #10868We can either:
- pursue this direction further, or
- change how we get executors for rpc somehow
cc @mattsse
I'm not sure but I think it should be made custom, would solve the compatibility issue easily
closing this because this is now integrated, rpc improvements tracked #11122
debug_executionWitness
currently needs to output all state required to execute the given block. The endpoint currently does not work for optimism because it needs to use the optimism executor, and the eth mainnet system calls may be different from optimism. It also needs to retain more execution-related information than is desired for the vanilla executor.The
debug_executionWitness
endpointThe endpoint needs to return the following information:
We need to leave the current executor as-is, so we don't do more than needed during regular block processing.
A new executor
So, we now have the
BlockAccessListExecutor
, which implements theExecutor
trait: https://github.com/paradigmxyz/reth/blob/9760319f3427dba39f431871011d3fb9ad9b3b41/crates/ethereum/evm/src/execute.rs#L392This is a new executor that retains the accessed state in the
BundleState
of theBlockExecutionOutput
. There is also one for optimism. This separate executor meets all requirements for the endpoint, but we still need to make this executor accessible to the RPC endpoint.Executors in RPC
We currently have the
BlockExecutorProvider
, which provides multiple types of executors for RPC to use: https://github.com/paradigmxyz/reth/blob/9760319f3427dba39f431871011d3fb9ad9b3b41/crates/evm/src/execute.rs#L110-L123This PR includes a third type of executor to include in the
BlockExecutorProvider
trait: https://github.com/paradigmxyz/reth/pull/10868We can either:
cc @mattsse