-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Move cfg_env and block_env configuration from PayloadBuilderAttributes into PayloadBuilder #10510
Conversation
crates/payload/basic/src/lib.rs
Outdated
/// Returns the configured [`CfgEnvWithHandlerCfg`] and [`BlockEnv`] for the targeted payload | ||
/// (that has the `parent` as its parent). | ||
/// | ||
/// The `chain_spec` is used to determine the correct chain id and hardfork for the payload | ||
/// based on its timestamp. | ||
/// | ||
/// Block related settings are derived from the `parent` block and the configured attributes. | ||
/// | ||
/// NOTE: This is only intended for beacon consensus (after merge). |
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.
I don't have enough context to meaningfully update this comment so please suggest alternatives.
Hey @mattsse @onbjerg one thing I'd love some guidance on is now that reth/crates/payload/basic/src/lib.rs Lines 676 to 679 in a942467
Both the OptimismPayloadBuilder and EthereumPayloadBuilder require these. I assume a good place to move these fields would be to |
ping @mattsse would love your thoughts here |
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.
I realized we need to do some additional changes first so we can easily do this
@onbjerg I removed the cfg_and_block_env from the trait and instead moved this into the payloadbuilder impl. this isn't perfect yet, because ideally we can use the evmconfig for this entirely, but this is currently tricky because we'd need to construct the new header right away |
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.
can work with this in alphanet for now
This PR moves the configuration environment and block environment setup from
PayloadBuilderAttributes
out into their respective payload builders.Context
Both
OptimismPayloadBuilder
andEthereumPayloadBuilder
have anevm_config
that defines afill_cfg_and_block_env
that we can use to populate.This closes #10446 which has additional context.