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 @@ -136,6 +136,14 @@ pub struct FlashblocksArgs {
)]
pub flashblocks_disable_state_root: bool,

/// Whether to disable async state root calculation on full payload resolution
#[arg(
long = "flashblocks.disable-async-calculate-state-root",
default_value = "false",
env = "FLASHBLOCKS_DISABLE_ASYNC_CALCULATE_STATE_ROOT"
)]
pub flashblocks_disable_async_calculate_state_root: bool,

/// Flashblocks number contract address
///
/// This is the address of the contract that will be used to increment the flashblock number.
Expand Down
2 changes: 1 addition & 1 deletion crates/op-rbuilder/src/builders/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use crate::{
};

/// Container type that holds all necessities to build a new payload.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct OpPayloadBuilderCtx<ExtraCtx: Debug + Default = ()> {
/// The type that knows how to perform system calls and configure the evm.
pub evm_config: OpEvmConfig,
Expand Down
9 changes: 9 additions & 0 deletions crates/op-rbuilder/src/builders/flashblocks/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ pub struct FlashblocksConfig {
/// Should we disable state root calculation for each flashblock
pub disable_state_root: bool,

/// Should we disable async state root calculation on full payload resolution
pub disable_async_calculate_state_root: bool,

/// The address of the flashblocks number contract.
///
/// If set a builder tx will be added to the start of every flashblock instead of the regular builder tx.
Expand Down Expand Up @@ -62,6 +65,7 @@ impl Default for FlashblocksConfig {
ws_addr: SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 1111),
interval: Duration::from_millis(250),
disable_state_root: false,
disable_async_calculate_state_root: false,
number_contract_address: None,
number_contract_use_permit: false,
send_offset_ms: 0,
Expand Down Expand Up @@ -89,6 +93,10 @@ impl TryFrom<OpRbuilderArgs> for FlashblocksConfig {

let disable_state_root = args.flashblocks.flashblocks_disable_state_root;

let disable_async_calculate_state_root = args
.flashblocks
.flashblocks_disable_async_calculate_state_root;

let number_contract_address = args.flashblocks.flashblocks_number_contract_address;

let number_contract_use_permit = args.flashblocks.flashblocks_number_contract_use_permit;
Expand All @@ -97,6 +105,7 @@ impl TryFrom<OpRbuilderArgs> for FlashblocksConfig {
ws_addr,
interval,
disable_state_root,
disable_async_calculate_state_root,
number_contract_address,
number_contract_use_permit,
send_offset_ms: args.flashblocks.flashblocks_send_offset_ms,
Expand Down
Loading
Loading