-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: restructure op builder #12229
Conversation
69ecdfd
to
c805e2c
Compare
There was a problem hiding this 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>( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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