1
1
use alloy_consensus:: { conditional:: BlockConditionalAttributes , Eip658Value , Transaction } ;
2
2
use alloy_eips:: Typed2718 ;
3
+ use alloy_evm:: Database ;
3
4
use alloy_op_evm:: block:: receipt_builder:: OpReceiptBuilder ;
4
5
use alloy_primitives:: { BlockHash , Bytes , U256 } ;
5
6
use alloy_rpc_types_eth:: Withdrawals ;
@@ -27,12 +28,9 @@ use reth_optimism_txpool::{
27
28
use reth_payload_builder:: PayloadId ;
28
29
use reth_primitives:: SealedHeader ;
29
30
use reth_primitives_traits:: { InMemorySize , SignedTransaction } ;
30
- use reth_provider:: ProviderError ;
31
31
use reth_revm:: { context:: Block , State } ;
32
32
use reth_transaction_pool:: { BestTransactionsAttributes , PoolTransaction } ;
33
- use revm:: {
34
- context:: result:: ResultAndState , interpreter:: as_u64_saturated, Database , DatabaseCommit ,
35
- } ;
33
+ use revm:: { context:: result:: ResultAndState , interpreter:: as_u64_saturated, DatabaseCommit } ;
36
34
use std:: { sync:: Arc , time:: Instant } ;
37
35
use tokio_util:: sync:: CancellationToken ;
38
36
use tracing:: { debug, info, trace} ;
@@ -237,13 +235,10 @@ impl OpPayloadBuilderCtx {
237
235
}
238
236
239
237
/// Executes all sequencer transactions that are included in the payload attributes.
240
- pub fn execute_sequencer_transactions < DB , E : Debug + Default > (
238
+ pub fn execute_sequencer_transactions < E : Debug + Default > (
241
239
& self ,
242
- db : & mut State < DB > ,
243
- ) -> Result < ExecutionInfo < E > , PayloadBuilderError >
244
- where
245
- DB : Database < Error = ProviderError > + std:: fmt:: Debug ,
246
- {
240
+ db : & mut State < impl Database > ,
241
+ ) -> Result < ExecutionInfo < E > , PayloadBuilderError > {
247
242
let mut info = ExecutionInfo :: with_capacity ( self . attributes ( ) . transactions . len ( ) ) ;
248
243
249
244
let mut evm = self . evm_config . evm_with_env ( & mut * db, self . evm_env . clone ( ) ) ;
@@ -324,17 +319,14 @@ impl OpPayloadBuilderCtx {
324
319
/// Executes the given best transactions and updates the execution info.
325
320
///
326
321
/// Returns `Ok(Some(())` if the job was cancelled.
327
- pub fn execute_best_transactions < DB , E : Debug + Default > (
322
+ pub fn execute_best_transactions < E : Debug + Default > (
328
323
& self ,
329
324
info : & mut ExecutionInfo < E > ,
330
- db : & mut State < DB > ,
325
+ db : & mut State < impl Database > ,
331
326
mut best_txs : impl PayloadTxsBounds ,
332
327
block_gas_limit : u64 ,
333
328
block_da_limit : Option < u64 > ,
334
- ) -> Result < Option < ( ) > , PayloadBuilderError >
335
- where
336
- DB : Database < Error = ProviderError > + std:: fmt:: Debug ,
337
- {
329
+ ) -> Result < Option < ( ) > , PayloadBuilderError > {
338
330
let execute_txs_start_time = Instant :: now ( ) ;
339
331
let mut num_txs_considered = 0 ;
340
332
let mut num_txs_simulated = 0 ;
@@ -343,11 +335,7 @@ impl OpPayloadBuilderCtx {
343
335
let mut num_bundles_reverted = 0 ;
344
336
let base_fee = self . base_fee ( ) ;
345
337
let tx_da_limit = self . da_config . max_da_tx_size ( ) ;
346
- let mut evm: alloy_op_evm:: OpEvm <
347
- & mut State < DB > ,
348
- revm:: inspector:: NoOpInspector ,
349
- reth_evm:: precompiles:: PrecompilesMap ,
350
- > = self . evm_config . evm_with_env ( & mut * db, self . evm_env . clone ( ) ) ;
338
+ let mut evm = self . evm_config . evm_with_env ( & mut * db, self . evm_env . clone ( ) ) ;
351
339
352
340
info ! (
353
341
target: "payload_builder" ,
0 commit comments