-
Notifications
You must be signed in to change notification settings - Fork 110
chore(builder): remove standard builder mode #421
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
Conversation
✅ Heimdall Review Status
|
|
@haardikk21 this lgtm, can you give it a rebase and I'll approve first thing |
| /// This trait is used to extend Reth's CLI with additional functionality that | ||
| /// are specific to the OP builder, such as populating default values for CLI arguments | ||
| /// when running in the playground mode or checking the builder mode. | ||
| /// when running in the playground mode. |
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.
| #[cfg(feature = "telemetry")] | ||
| let telemetry_args = match &cli.command { | ||
| reth_optimism_cli::commands::Commands::Node(node_command) => { | ||
| node_command.ext.telemetry.clone() | ||
| } | ||
| _ => Default::default(), | ||
| }; | ||
|
|
||
| #[cfg(not(feature = "telemetry"))] | ||
| let cli_app = cli.configure(); | ||
|
|
||
| #[cfg(feature = "telemetry")] | ||
| let mut cli_app = cli.configure(); | ||
| #[cfg(feature = "telemetry")] |
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.
| use super::payload::FlashblocksExecutionInfo; | ||
| use crate::{flashblocks::OpPayloadBuilderCtx, primitives::reth::ExecutionInfo, tx_signer::Signer}; | ||
|
|
||
| sol!( | ||
| // From https://github.com/Uniswap/flashblocks_number_contract/blob/main/src/FlashblockNumber.sol |
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.
| }; | ||
|
|
||
| #[derive(Debug, Default, Clone)] | ||
| pub struct FlashblocksExtraCtx { |
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.
| struct VariantInfo { | ||
| name: &'static str, | ||
| builder_type: &'static str, | ||
| default_instance_call: &'static str, | ||
| args_modifier: fn(&proc_macro2::TokenStream) -> proc_macro2::TokenStream, | ||
| default_args_factory: fn() -> proc_macro2::TokenStream, | ||
| } | ||
|
|
||
| const BUILDER_VARIANTS: &[VariantInfo] = &[ | ||
| VariantInfo { | ||
| name: "standard", | ||
| builder_type: "crate::builders::StandardBuilder", | ||
| default_instance_call: "crate::tests::LocalInstance::standard().await?", | ||
| args_modifier: |args| quote! { #args }, | ||
| default_args_factory: || quote! { Default::default() }, | ||
| }, | ||
| VariantInfo { | ||
| name: "flashblocks", | ||
| builder_type: "crate::builders::FlashblocksBuilder", | ||
| default_instance_call: "crate::tests::LocalInstance::flashblocks().await?", | ||
| args_modifier: |args| { | ||
| quote! { | ||
| { | ||
| let mut args = #args; | ||
| args.flashblocks.enabled = true; | ||
| args.flashblocks.flashblocks_port = crate::tests::get_available_port(); | ||
| args | ||
| } | ||
| const BUILDER_VARIANTS: &[VariantInfo] = &[VariantInfo { | ||
| name: "flashblocks", | ||
| default_instance_call: "crate::tests::LocalInstance::flashblocks().await?", | ||
| args_modifier: |args| { | ||
| quote! { | ||
| { | ||
| let mut args = #args; | ||
| args.flashblocks.flashblocks_port = crate::tests::get_available_port(); | ||
| args |
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.
Closes #412
rb_testmacro to only test for Flashblocks--flashblocks.enabledCLI arg as it's considered always-on nowMost importantly, makes integrating FAL stuff into the builder way easier now that we dont have to worry about pleasing Rust's typesystem with the generic dance anymore