Skip to content

Commit

Permalink
add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sapinb committed Feb 5, 2025
1 parent 301f0cf commit e60a03e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions bin/strata-sequencer-client/src/duty_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ where
if now_millis() < duty.target_ts() {
// wait until target time
// TODO: ensure duration is within some bounds
info!(?duty, "got duty too early; sleeping till target time");
tokio::time::sleep(tokio::time::Duration::from_millis(
duty.target_ts() - now_millis(),
))
Expand All @@ -107,13 +108,19 @@ where
.await
.map_err(DutyExecError::GenerateTemplate)?;

let id = template.template_id();

info!(?duty, ?id, "got block template");

let signature = sign_header(template.header(), &idata.key);
let completion = BlockCompletionData::from_signature(signature);

rpc.complete_block_template(template.template_id(), completion)
.await
.map_err(DutyExecError::CompleteTemplate)?;

info!(?duty, ?id, "block signing complete");

Ok(())
}

Expand Down
4 changes: 2 additions & 2 deletions bin/strata-sequencer-client/src/duty_fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{sync::Arc, time::Duration};
use strata_rpc_api::StrataSequencerApiClient;
use strata_sequencer::duty::types::Duty;
use tokio::sync::mpsc;
use tracing::{debug, error, warn};
use tracing::{error, info, warn};

pub(crate) async fn duty_fetcher_worker<R>(
rpc: Arc<R>,
Expand All @@ -25,7 +25,7 @@ where
}
};

debug!("got {} duties", duties.len());
info!("got {} duties", duties.len());

for duty in duties {
if duty_tx.send(duty).await.is_err() {
Expand Down

0 comments on commit e60a03e

Please sign in to comment.