-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the feature
Our goal is to reuse transaction validation work from flashblocks during engine validation.
Currently, the engine validator is an add-on that can be specified through the Reth Node API:
reth/crates/optimism/node/src/node.rs
Line 254 in 2305c3e
| BasicEngineValidatorBuilder<OpEngineValidatorBuilder>, |
However, there are private fields and structs, so it's not possible to implement the existing BasicEngineValidator externally.
Here are the changes we made to BasicEngineValidator to reuse execution results: https://github.com/base/base/pull/509/files#diff-d89f69cddd687427998ca98935d9568f4787fc1831f9cd032f8787fb720851d4
Our question is:
- Should we submit a PR to make more fields public and slightly refactor BasicEngineValidator to make it easier to wrap? Maybe we can decompose it slightly so the executor is a trait that can be overridden...
- Add trait to allow wrapping
Executor? - Pass
execute_blockas a callback to allow overriding just that method? - Extract
execute_blockto a new trait likeEngineExecutorthatEngineValidatorwould call? - Or implement
CachedExecutionProviderupstream so you can also reuse flashblock execution? - Something else?
- Add trait to allow wrapping
We'd like to avoid copying the entire engine-tree crate into our repo and try to make as many methods just self.inner.whatever() to avoid duplicating validate_block_with_state logic as much as possible.
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status