@@ -9,7 +9,7 @@ use tokio::{
9
9
select,
10
10
sync:: { mpsc, watch} ,
11
11
} ;
12
- use tracing:: { instrument, trace, trace_span} ;
12
+ use tracing:: { debug , error , instrument, trace, trace_span} ;
13
13
use trevm:: {
14
14
db:: { cow:: CacheOnWrite , TryCachingDb } ,
15
15
helpers:: Ctx ,
@@ -285,17 +285,15 @@ where
285
285
. unwrap_or_default ( ) ;
286
286
let score = beneficiary_balance. saturating_sub ( initial_beneficiary_balance) ;
287
287
288
- trace ! (
289
- gas_used = gas_used ,
290
- score = %score,
288
+ debug ! (
289
+ gas_used,
290
+ %score,
291
291
reverted = !success,
292
292
halted,
293
293
halt_reason = ?if halted { halt_reason } else { None } ,
294
294
revert_reason = if !success { reason } else { None } ,
295
295
"Simulation complete"
296
296
) ;
297
-
298
- // Create the outcome
299
297
Ok ( SimOutcomeWithCache { identifier, score, cache, gas_used } )
300
298
}
301
299
Err ( e) => Err ( SignetEthBundleError :: from ( e. into_error ( ) ) ) ,
@@ -318,15 +316,18 @@ where
318
316
// Run the bundle
319
317
let trevm = match driver. run_bundle ( trevm) {
320
318
Ok ( result) => result,
321
- Err ( e) => return Err ( e. into_error ( ) ) ,
319
+ Err ( e) => {
320
+ error ! ( ?e, "run bundle returned an error" ) ;
321
+ return Err ( e. into_error ( ) ) ;
322
+ }
322
323
} ;
323
324
324
325
// Build the SimOutcome
325
326
let score = driver. beneficiary_balance_increase ( ) ;
326
327
let gas_used = driver. total_gas_used ( ) ;
327
328
let cache = trevm. into_db ( ) . into_cache ( ) ;
328
329
329
- trace ! (
330
+ debug ! (
330
331
gas_used = gas_used,
331
332
score = %score,
332
333
"Bundle simulation successful"
@@ -384,10 +385,10 @@ where
384
385
let _ = c. blocking_send ( candidate) ;
385
386
return ;
386
387
}
387
- trace ! ( gas_used = candidate. gas_used, max_gas, "Gas limit exceeded" ) ;
388
+ debug ! ( gas_used = candidate. gas_used, max_gas, "Gas limit exceeded" ) ;
388
389
}
389
390
Err ( e) => {
390
- trace ! ( ?identifier, ?e, "Simulation failed" ) ;
391
+ debug ! ( ?identifier, ?e, "Simulation failed" ) ;
391
392
}
392
393
} ;
393
394
// fall through applies to all errors, occurs if
0 commit comments