Skip to content

Commit bd9ae0a

Browse files
committed
fix(coprocessor): fix missing downgrade of scheduler error in tfhe-worker (#1352)
1 parent a80bc5d commit bd9ae0a

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

coprocessor/fhevm-engine/scheduler/src/dfg/scheduler.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ fn execute_partition(
346346
for (h, i) in tx_inputs.iter_mut() {
347347
if i.is_none() {
348348
let Some(Ok(ct)) = res.get(h) else {
349-
warn!(target: "scheduler", {transaction_id = ?tid },
350-
"Missing input to compute transaction - skipping");
349+
warn!(target: "scheduler", {transaction_id = ?hex::encode(tid) },
350+
"Missing input to compute transaction - skipping");
351351
for nidx in dfg.graph.node_identifiers() {
352352
let Some(node) = dfg.graph.node_weight_mut(nidx) else {
353353
error!(target: "scheduler", {index = ?nidx.index() }, "Wrong dataflow graph index");
@@ -375,7 +375,7 @@ fn execute_partition(
375375
if let Err(e) =
376376
re_randomise_transaction_inputs(tx_inputs, &tid, cid, gpu_idx, cpk.clone())
377377
{
378-
error!(target: "scheduler", {transaction_id = ?tid, error = ?e },
378+
error!(target: "scheduler", {transaction_id = ?hex::encode(tid), error = ?e },
379379
"Error while re-randomising inputs");
380380
for nidx in dfg.graph.node_identifiers() {
381381
let Some(node) = dfg.graph.node_weight_mut(nidx) else {
@@ -401,7 +401,7 @@ fn execute_partition(
401401
// If re-randomisation is not available (e.g., on GPU),
402402
// only decompress ciphertexts
403403
if let Err(e) = decompress_transaction_inputs(tx_inputs, &tid, gpu_idx, cpk.clone()) {
404-
error!(target: "scheduler", {transaction_id = ?tid, error = ?e },
404+
error!(target: "scheduler", {transaction_id = ?hex::encode(tid), error = ?e },
405405
"Error while decompressing inputs");
406406
for nidx in dfg.graph.node_identifiers() {
407407
let Some(node) = dfg.graph.node_weight_mut(nidx) else {
@@ -499,7 +499,7 @@ fn try_execute_node(
499499
cts.push(i);
500500
} else {
501501
// That should not be possible as we called the checker.
502-
error!(target: "scheduler", { handle = ?node.result_handle }, "Computation missing inputs");
502+
error!(target: "scheduler", { handle = ?hex::encode(&node.result_handle) }, "Computation missing inputs");
503503
return Err(SchedulerError::MissingInputs.into());
504504
}
505505
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,11 @@ async fn upload_transaction_graph_results<'a>(
548548
CoprocessorError::SchedulerError(SchedulerError::MissingInputs)
549549
) {
550550
uncomputable.push((result.handle.clone(), result.transaction_id.clone()));
551+
// Make sure we don't mark this as an error since this simply means that the
552+
// inputs weren't available when we tried scheduling these operations.
553+
// Setting them as uncomputable will postpone them with an exponential backoff
554+
// and they will be retried later.
555+
continue;
551556
}
552557
}
553558
set_computation_error(

0 commit comments

Comments
 (0)