@@ -1418,9 +1418,7 @@ func (w *worker) fillTransactionsAlgoWorker(interrupt *int32, env *environment,
1418
1418
return err , nil
1419
1419
}
1420
1420
1421
- start := time .Now ()
1422
1421
simBundles , err := w .simulateBundles (env , bundles , nil ) /* do not consider gas impact of mempool txs as bundles are treated as transactions wrt ordering */
1423
- log .Debug ("Simulated bundles" , "time" , time .Since (start ), "bundles" , len (bundles ))
1424
1422
if err != nil {
1425
1423
log .Error ("Failed to simulate flashbots bundles" , "err" , err )
1426
1424
return err , nil
@@ -1429,10 +1427,8 @@ func (w *worker) fillTransactionsAlgoWorker(interrupt *int32, env *environment,
1429
1427
bundlesToConsider = simBundles
1430
1428
}
1431
1429
1432
- start := time .Now ()
1433
1430
builder := newGreedyBuilder (w .chain , w .chainConfig , w .blockList , env , interrupt )
1434
1431
newEnv , blockBundles := builder .buildBlock (bundlesToConsider , pending )
1435
- log .Debug ("Build block" , "time" , time .Since (start ), "gasUsed" , newEnv .header .GasUsed )
1436
1432
* env = * newEnv
1437
1433
1438
1434
if validatorCoinbase != nil && w .config .BuilderTxSigningKey != nil {
@@ -1484,7 +1480,6 @@ func (w *worker) generateWork(params *generateParams) (*types.Block, *big.Int, e
1484
1480
if errors .Is (err , errBlockInterruptedByTimeout ) {
1485
1481
log .Warn ("Block building is interrupted" , "allowance" , common .PrettyDuration (w .newpayloadTimeout ))
1486
1482
}
1487
- log .Debug ("Filled block with transactions" , "time" , time .Since (start ), "gas used" , work .header .GasUsed , "txs" , len (work .txs ))
1488
1483
}
1489
1484
block , err := w .engine .FinalizeAndAssemble (w .chain , work .header , work .state , work .txs , work .unclelist (), work .receipts , params .withdrawals )
1490
1485
if err != nil {
@@ -1708,6 +1703,7 @@ func (w *worker) mergeBundles(env *environment, bundles []simulatedBundle, pendi
1708
1703
}
1709
1704
1710
1705
func (w * worker ) simulateBundles (env * environment , bundles []types.MevBundle , pendingTxs map [common.Address ]types.Transactions ) ([]simulatedBundle , error ) {
1706
+ start := time .Now ()
1711
1707
headerHash := env .header .Hash ()
1712
1708
simCache := w .flashbots .bundleCache .GetBundleCache (headerHash )
1713
1709
@@ -1730,7 +1726,7 @@ func (w *worker) simulateBundles(env *environment, bundles []types.MevBundle, pe
1730
1726
simmed , err := w .computeBundleGas (env , bundle , state , gasPool , pendingTxs , 0 )
1731
1727
1732
1728
if err != nil {
1733
- log .Debug ("Error computing gas for a bundle" , "error" , err )
1729
+ log .Trace ("Error computing gas for a bundle" , "error" , err )
1734
1730
return
1735
1731
}
1736
1732
simResult [idx ] = & simmed
@@ -1748,6 +1744,8 @@ func (w *worker) simulateBundles(env *environment, bundles []types.MevBundle, pe
1748
1744
}
1749
1745
}
1750
1746
1747
+ okBundles := len (bundles ) - len (simulatedBundles )
1748
+ log .Debug ("Simulated bundles" , "block" , env .header .Number , "allBundles" , len (bundles ), "okBundles" , okBundles , "time" , time .Since (start ))
1751
1749
return simulatedBundles , nil
1752
1750
}
1753
1751
0 commit comments