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

refactor!: streamline OpBlockExecutionError error type to replace a hard-coded BlockExecutionError #13696

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

chungquantin
Copy link
Contributor

@chungquantin chungquantin commented Jan 7, 2025

Current issue

Adding a variant and removing the conversion brings complexities everywhere BlockExecutionError hard-coded in the associated type. Takes BlockExecutionStrategyFactory, BatchExecutor or BlockExecutorProvider. And the conversion between OpBlockExecutionError -> BlockExecutionError is still required in some parts of the code.

Requires opinions from the core devs before taking extra steps to finish this PR.

Link to the issue: #13644
cc: @emhane

@chungquantin chungquantin changed the title refactor: add Eth variant to OpBlockExecutionError refactor: add Eth variant to OpBlockExecutionError Jan 7, 2025
Copy link
Member

@emhane emhane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good under way! removing the hardcoded F: BlockExecutionStrategyFactory<Error = BlockExecutionError> should allow you to make progress to get it compiling. aware this pr may grow large.

crates/evm/src/execute.rs Outdated Show resolved Hide resolved
crates/optimism/evm/src/error.rs Outdated Show resolved Hide resolved
crates/blockchain-tree/src/chain.rs Outdated Show resolved Hide resolved
@chungquantin chungquantin requested a review from klkvr as a code owner January 16, 2025 16:19
@Rjected
Copy link
Member

Rjected commented Jan 16, 2025

This should be rebased to resolve all the merge conflicts, it might become simpler as the legacy tree etc have been removed

@Rjected
Copy link
Member

Rjected commented Jan 17, 2025

Sorry, will have to be rebased or merged again once #13839 is merged, since nightly clippy is broken right now

@chungquantin
Copy link
Contributor Author

Sorry, will have to be rebased or merged again once #13839 is merged, since nightly clippy is broken right now

That's ok, I don't see it as a breaking change.

@chungquantin chungquantin changed the title refactor: add Eth variant to OpBlockExecutionError refactor: streamline OpBlockExecutionError error type to replace a hard-coded BlockExecutionError Jan 17, 2025
@chungquantin chungquantin changed the title refactor: streamline OpBlockExecutionError error type to replace a hard-coded BlockExecutionError refactor!: streamline OpBlockExecutionError error type to replace a hard-coded BlockExecutionError Jan 17, 2025
crates/evm/execution-errors/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when new trait BlockExecError (see comment about rename) is implemented for the OpBlockExecutionError too, then seems like this is possibly getting closed to finish :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants