Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/op-rbuilder/src/args/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ fn expand_path(s: &str) -> Result<PathBuf> {
/// Parameters for Flashblocks configuration
#[derive(Debug, Clone, PartialEq, Eq, clap::Args)]
pub struct FlashblocksArgs {
/// DEPRECATED. Will be removed in next minor release
#[arg(
long = "flashblocks.enabled",
default_value = "true",
env = "ENABLE_FLASHBLOCKS"
)]
pub enabled: bool,

/// The port that we bind to for the websocket server that provides flashblocks
#[arg(
long = "flashblocks.port",
Expand Down
7 changes: 7 additions & 0 deletions crates/op-rbuilder/src/builder/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use core::{
net::{Ipv4Addr, SocketAddr},
time::Duration,
};
use tracing::warn;

/// Configuration values that are specific to the flashblocks builder.
#[derive(Debug, Clone)]
Expand Down Expand Up @@ -86,6 +87,12 @@ impl TryFrom<OpRbuilderArgs> for FlashblocksConfig {
type Error = eyre::Report;

fn try_from(args: OpRbuilderArgs) -> Result<Self, Self::Error> {
if !args.flashblocks.enabled {
warn!(
"Standard building mode is deprecated and this flag will be removed in a future release. Running in flashblocks mode"
)
}

let interval = Duration::from_millis(args.flashblocks.flashblocks_block_time);

let ws_addr = SocketAddr::new(
Expand Down
Loading