Skip to content

Commit 3230879

Browse files
committed
refactor(coprocessor): unify info macro usage and remove duplicate event
1 parent fdd7acb commit 3230879

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

coprocessor/fhevm-engine/tfhe-worker/src/tfhe_worker.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ async fn tfhe_worker_cycle(
188188
.unwrap_or_else(|| "none".to_string()),
189189
),
190190
);
191-
tracing::info!(
191+
info!(
192192
parent: &dcid_span,
193193
dependence_chain_id = ?dependence_chain_id.as_ref().map(hex::encode),
194194
"acquired dependence chain lock"
@@ -334,7 +334,7 @@ async fn query_for_work<'a>(
334334
.unwrap_or_else(|| "none".to_string()),
335335
),
336336
);
337-
tracing::info!(parent: &s_dcid, "query dependence chain result");
337+
info!(parent: &s_dcid, "query dependence chain result");
338338
let s_work = tracing::info_span!(
339339
"query_work_items",
340340
operation = "query_work_items",
@@ -383,7 +383,7 @@ WHERE c.transaction_id IN (
383383

384384
WORK_ITEMS_QUERY_HISTOGRAM.observe(started_at.elapsed().unwrap_or_default().as_secs_f64());
385385
s_work.record("count", the_work.len());
386-
tracing::info!(parent: &s_work, "work items queried");
386+
info!(parent: &s_work, "work items queried");
387387
health_check.update_db_access();
388388
if the_work.is_empty() {
389389
if let Some(dependence_chain_id) = &dependence_chain_id {

coprocessor/fhevm-engine/zkproof-worker/src/verifier.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,7 @@ async fn execute_verify_proof_routine(
350350
let count = cts.len();
351351
insert_ciphertexts(&mut txn, cts, blob_hash).await?;
352352

353-
info!(message = "Ciphertexts inserted", request_id);
354-
tracing::info!(count = count, "ciphertexts inserted");
353+
info!(message = "Ciphertexts inserted", request_id, count);
355354
}
356355
Err(err) => {
357356
error!(
@@ -362,7 +361,7 @@ async fn execute_verify_proof_routine(
362361
}
363362
}
364363

365-
tracing::info!(valid = verified, "db_insert result");
364+
info!(valid = verified, "db_insert result");
366365

367366
// Mark as verified=true/false and set handles, if computed
368367
sqlx::query(
@@ -483,7 +482,7 @@ fn verify_proof_only(
483482
return Err(err);
484483
}
485484

486-
tracing::info!(list_len = the_list.len(), "proof verified");
485+
info!(list_len = the_list.len(), "proof verified");
487486
Ok(the_list)
488487
}
489488

@@ -553,7 +552,7 @@ fn create_ciphertext(
553552
handle[31] = current_ciphertext_version() as u8;
554553

555554
tracing::Span::current().record("ct_type", tracing::field::display(serialized_type));
556-
tracing::info!(
555+
info!(
557556
request_id,
558557
handle = %hex::encode(&handle),
559558
user_address = %aux_data.user_address,

0 commit comments

Comments
 (0)