11use crate :: {
2- builders:: {
3- builder_tx:: StandardBuilderTx , generator:: BuildArguments , BuilderConfig ,
4- BuilderTransactions ,
5- } ,
6- flashtestations:: service:: bootstrap_flashtestations,
2+ builders:: { generator:: BuildArguments , BuilderConfig , BuilderTransactions } ,
73 metrics:: OpRBuilderMetrics ,
84 primitives:: reth:: ExecutionInfo ,
9- traits:: { ClientBounds , NodeBounds , PayloadTxsBounds , PoolBounds } ,
5+ traits:: { ClientBounds , PayloadTxsBounds , PoolBounds } ,
106} ;
117use alloy_consensus:: {
128 constants:: EMPTY_WITHDRAWALS , proofs, BlockBody , Header , EMPTY_OMMER_ROOT_HASH ,
@@ -18,7 +14,6 @@ use reth_basic_payload_builder::{BuildOutcome, BuildOutcomeKind, MissingPayloadB
1814use reth_chain_state:: { ExecutedBlock , ExecutedBlockWithTrieUpdates , ExecutedTrieUpdates } ;
1915use reth_evm:: { execute:: BlockBuilder , ConfigureEvm } ;
2016use reth_node_api:: { Block , PayloadBuilderError } ;
21- use reth_node_builder:: { components:: PayloadBuilderBuilder , BuilderContext } ;
2217use reth_optimism_consensus:: { calculate_receipt_root_no_memo_optimism, isthmus} ;
2318use reth_optimism_evm:: { OpEvmConfig , OpNextBlockEnvAttributes } ;
2419use reth_optimism_forks:: OpHardforks ;
@@ -41,64 +36,6 @@ use tracing::{error, info, warn};
4136
4237use super :: super :: context:: OpPayloadBuilderCtx ;
4338
44- pub struct StandardPayloadBuilderBuilder ( pub BuilderConfig < ( ) > ) ;
45-
46- impl < Node , Pool > PayloadBuilderBuilder < Node , Pool , OpEvmConfig > for StandardPayloadBuilderBuilder
47- where
48- Node : NodeBounds ,
49- Pool : PoolBounds ,
50- {
51- type PayloadBuilder = StandardOpPayloadBuilder < Pool , Node :: Provider , StandardBuilderTx > ;
52-
53- async fn build_payload_builder (
54- self ,
55- ctx : & BuilderContext < Node > ,
56- pool : Pool ,
57- _evm_config : OpEvmConfig ,
58- ) -> eyre:: Result < Self :: PayloadBuilder > {
59- let signer = self . 0 . builder_signer ;
60- if self . 0 . flashtestations_config . flashtestations_enabled {
61- let _flashtestation_builder_tx = match bootstrap_flashtestations (
62- self . 0 . flashtestations_config . clone ( ) ,
63- ctx,
64- signer,
65- )
66- . await
67- {
68- Ok ( flashtestation_builder_tx) => flashtestation_builder_tx,
69- Err ( e) => {
70- tracing:: warn!( error = %e, "Failed to spawn flashtestations service, falling back to standard builder tx" ) ;
71- return Ok ( StandardOpPayloadBuilder :: new (
72- OpEvmConfig :: optimism ( ctx. chain_spec ( ) ) ,
73- pool,
74- ctx. provider ( ) . clone ( ) ,
75- self . 0 . clone ( ) ,
76- StandardBuilderTx :: new ( self . 0 . builder_signer ) ,
77- ) ) ;
78- }
79- } ;
80-
81- if self . 0 . flashtestations_config . enable_block_proofs {
82- // return Ok(StandardOpPayloadBuilder::new(
83- // OpEvmConfig::optimism(ctx.chain_spec()),
84- // pool,
85- // ctx.provider().clone(),
86- // self.0.clone(),
87- // flashtestation_builder_tx,
88- // ));
89- }
90- }
91-
92- Ok ( StandardOpPayloadBuilder :: new (
93- OpEvmConfig :: optimism ( ctx. chain_spec ( ) ) ,
94- pool,
95- ctx. provider ( ) . clone ( ) ,
96- self . 0 . clone ( ) ,
97- StandardBuilderTx :: new ( self . 0 . builder_signer ) ,
98- ) )
99- }
100- }
101-
10239/// Optimism's payload builder
10340#[ derive( Debug , Clone ) ]
10441pub struct StandardOpPayloadBuilder < Pool , Client , BuilderTx , Txs = ( ) > {
0 commit comments