Skip to content

Commit ea54029

Browse files
committed
logs for debugging
1 parent d8ffad2 commit ea54029

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tasks/env.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use alloy::{
77
};
88
use tokio::{sync::watch, task::JoinHandle};
99
use tokio_stream::StreamExt;
10-
use tracing::{Instrument, Span, info_span};
10+
use tracing::{Instrument, Span, debug, info_span};
1111
use trevm::revm::{context::BlockEnv, context_interface::block::BlobExcessGasAndPrice};
1212

1313
/// A task that constructs a BlockEnv for the next block in the rollup chain.
@@ -108,16 +108,22 @@ impl EnvTask {
108108
while let Some(rollup_header) =
109109
headers.next().instrument(info_span!("EnvTask::task_fut::stream")).await
110110
{
111+
debug!(?rollup_header, "received new rollup block header");
112+
111113
let host_block_number =
112114
self.config.constants.rollup_block_to_host_block_num(rollup_header.number);
115+
debug!(%host_block_number, "mapped rollup block number to host block number");
113116

114117
let span = info_span!("SimEnv", %host_block_number, %rollup_header.hash, %rollup_header.number);
118+
span_debug!(span, "processing new rollup block header");
115119

116120
let host_block_opt = res_unwrap_or_continue!(
117121
self.host_provider.get_block_by_number(host_block_number.into()).await,
118122
span,
119123
error!("error fetching previous host block - skipping block submission")
120124
);
125+
span_debug!(span, ?host_block_opt, "fetched previous host block");
126+
121127
let prev_host = opt_unwrap_or_continue!(
122128
host_block_opt,
123129
span,

0 commit comments

Comments
 (0)