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

feat: restructure op builder #12229

Merged
merged 11 commits into from
Nov 5, 2024
Merged

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Oct 31, 2024

supersedes #11073

closes #11040

This refactors how the OP payload is being constructed.
Introduces a new Ctx type that provides reusable logic for transacting.
This now also makes it possible easily modify how new txs are getting included int the block

@mattsse mattsse added the A-op-reth Related to Optimism and op-reth label Oct 31, 2024
@github-actions github-actions bot added A-block-building Related to block building C-debt Refactor of code section that is hard to understand or maintain labels Oct 31, 2024
@mattsse mattsse marked this pull request as ready for review November 4, 2024 12:16
@mattsse mattsse force-pushed the matt/restructure-op-payload-builder branch from 69ecdfd to c805e2c Compare November 4, 2024 13:37
Copy link
Collaborator

@klkvr klkvr left a comment

Choose a reason for hiding this comment

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

lgtm!

@@ -152,7 +811,7 @@ where
/// and configuration, this function creates a transaction payload. Returns
/// a result indicating success with the payload or an error in case of failure.
#[inline]
pub(crate) fn optimism_payload<EvmConfig, Pool, Client>(
pub fn optimism_payload<EvmConfig, Pool, Client>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

this can be removed now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, will remove before merging

// Configure the environment for the block.
let mut evm = self.evm_config.evm_with_env(&mut *db, env);

let ResultAndState { result, state } = match evm.transact() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we unify paths here for execution of sequencer and non-sequencer transactions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, I'd like that, but separately, wanted to keep it as similar to the previous version as possible

@mattsse mattsse added the S-blocked This cannot more forward until something else changes label Nov 5, 2024
@mattsse mattsse enabled auto-merge November 5, 2024 14:02
@mattsse mattsse added this pull request to the merge queue Nov 5, 2024
Merged via the queue into main with commit 5af5517 Nov 5, 2024
40 checks passed
@mattsse mattsse deleted the matt/restructure-op-payload-builder branch November 5, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-block-building Related to block building A-op-reth Related to Optimism and op-reth C-debt Refactor of code section that is hard to understand or maintain S-blocked This cannot more forward until something else changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve OP payload builder
2 participants