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
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion crates/builder/op-rbuilder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ workspace = true
base-builder-cli.workspace = true
base-bundles.workspace = true
base-flashtypes.workspace = true
base-primitives = { workspace = true, features = ["op-rbuilder"] }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove the op-rbuilder feature flag on primitives. No need to gate the basic types


reth-optimism-node.workspace = true
reth-optimism-cli.workspace = true
Expand Down Expand Up @@ -58,7 +59,7 @@ reth-rpc-api.workspace = true
reth-rpc-eth-types.workspace = true
reth-optimism-rpc.workspace = true
reth-tasks.workspace = true
reth-tracing-otlp.workspace = true
reth-tracing-otlp = { workspace = true, optional = true }

alloy-primitives.workspace = true
alloy-consensus.workspace = true
Expand Down Expand Up @@ -199,6 +200,11 @@ interop = []

custom-engine-api = []

telemetry = [
"dep:opentelemetry",
"dep:reth-tracing-otlp",
]

[[bin]]
name = "tester"
required-features = ["testing"]
2 changes: 1 addition & 1 deletion crates/builder/op-rbuilder/src/flashblocks/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use alloy_evm::Database;
use alloy_op_evm::block::receipt_builder::OpReceiptBuilder;
use alloy_primitives::{BlockHash, Bytes, U256};
use alloy_rpc_types_eth::Withdrawals;
use base_primitives::op_rbuilder::reth::{ExecutionInfo, TxnExecutionResult};
use op_alloy_consensus::OpDepositReceipt;
use op_revm::OpSpecId;
use reth_basic_payload_builder::PayloadConfig;
Expand Down Expand Up @@ -43,7 +44,6 @@ use tracing::{debug, info, trace};
use crate::{
flashblocks::payload::FlashblocksExecutionInfo,
metrics::OpRBuilderMetrics,
primitives::reth::{ExecutionInfo, TxnExecutionResult},
traits::PayloadTxsBounds,
tx_data_store::{TxData, TxDataStore},
};
Expand Down
2 changes: 1 addition & 1 deletion crates/builder/op-rbuilder/src/flashblocks/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use alloy_primitives::{B256, U256};
use base_flashtypes::{
ExecutionPayloadBaseV1, ExecutionPayloadFlashblockDeltaV1, FlashblocksPayloadV1,
};
use base_primitives::op_rbuilder::reth::ExecutionInfo;
use eyre::WrapErr as _;
use reth_basic_payload_builder::BuildOutcome;
use reth_chain_state::ExecutedBlock;
Expand Down Expand Up @@ -52,7 +53,6 @@ use crate::{
generator::{BlockCell, BuildArguments, PayloadBuilder},
},
metrics::OpRBuilderMetrics,
primitives::reth::ExecutionInfo,
traits::{ClientBounds, PoolBounds},
};

Expand Down
15 changes: 11 additions & 4 deletions crates/builder/op-rbuilder/src/launcher.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::Arc;

use base_builder_cli::{Cli, CliExt, CliVersionInfo, OpRbuilderArgs};
use base_primitives::op_rbuilder::reth::engine_api_builder::OpEngineApiBuilder;
use eyre::Result;
use reth_cli_commands::launcher::Launcher;
use reth_db::mdbx::DatabaseEnv;
Expand All @@ -17,7 +18,6 @@ use reth_optimism_txpool::OpPooledTransaction;
use crate::{
flashblocks::{BuilderConfig, FlashblocksServiceBuilder},
metrics::{LONG_VERSION, SHORT_VERSION, VERSION},
primitives::reth::engine_api_builder::OpEngineApiBuilder,
tx_data_store::{BaseApiExtServer, TxDataStoreExt},
};

Expand Down Expand Up @@ -47,9 +47,16 @@ pub fn launch() -> Result<()> {

// Only setup telemetry if an OTLP endpoint is provided
if telemetry_args.otlp_endpoint.is_some() {
use crate::primitives::telemetry::setup_telemetry_layer;
let telemetry_layer = setup_telemetry_layer(&telemetry_args)?;
cli_app.access_tracing_layers()?.add_layer(telemetry_layer);
#[cfg(feature = "telemetry")]
{
use crate::telemetry::setup_telemetry_layer;
let telemetry_layer = setup_telemetry_layer(&telemetry_args)?;
cli_app.access_tracing_layers()?.add_layer(telemetry_layer);
}
#[cfg(not(feature = "telemetry"))]
{
return Err(eyre::eyre!("telemetry feature is disabled"));
}
Comment on lines +50 to +59
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to reintroduce this feature flag? I personally would rather avoid feature flags if possible.

}

tracing::info!("Starting OP builder in flashblocks mode");
Expand Down
3 changes: 2 additions & 1 deletion crates/builder/op-rbuilder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
pub mod flashblocks;
pub mod launcher;
pub mod metrics;
pub mod primitives;
#[cfg(feature = "telemetry")]
pub mod telemetry;
pub mod traits;
pub mod tx_data_store;
pub mod tx_signer;
Expand Down
Loading