Skip to content

Commit f5441dd

Browse files
committed
fix(coprocessor): fix missing downgrade of scheduler error in tfhe-worker
1 parent affbe87 commit f5441dd

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ async fn execute_partition(
483483
for (h, i) in tx_inputs.iter_mut() {
484484
if i.is_none() {
485485
let Some(Ok(ct)) = res.get(h) else {
486-
warn!(target: "scheduler", {transaction_id = ?tid },
486+
warn!(target: "scheduler", {transaction_id = ?hex::encode(tid) },
487487
"Missing input to compute transaction - skipping");
488488
for nidx in dfg.graph.node_identifiers() {
489489
let Some(node) = dfg.graph.node_weight_mut(nidx) else {
@@ -510,7 +510,7 @@ async fn execute_partition(
510510
// Re-randomise inputs of the transaction - this also
511511
// decompresses ciphertexts
512512
if let Err(e) = re_randomise_transaction_inputs(tx_inputs, &tid, gpu_idx, cpk.clone()) {
513-
error!(target: "scheduler", {transaction_id = ?tid, error = ?e },
513+
error!(target: "scheduler", {transaction_id = ?hex::encode(tid), error = ?e },
514514
"Error while re-randomising inputs");
515515
for nidx in dfg.graph.node_identifiers() {
516516
let Some(node) = dfg.graph.node_weight_mut(nidx) else {
@@ -536,7 +536,7 @@ async fn execute_partition(
536536
// If re-randomisation is not available (e.g., on GPU),
537537
// only decompress ciphertexts
538538
if let Err(e) = decompress_transaction_inputs(tx_inputs, &tid, gpu_idx, cpk.clone()) {
539-
error!(target: "scheduler", {transaction_id = ?tid, error = ?e },
539+
error!(target: "scheduler", {transaction_id = ?hex::encode(tid), error = ?e },
540540
"Error while decompressing inputs");
541541
for nidx in dfg.graph.node_identifiers() {
542542
let Some(node) = dfg.graph.node_weight_mut(nidx) else {
@@ -639,7 +639,7 @@ fn try_schedule_node(
639639
cts.push(i);
640640
} else {
641641
// That should not be possible as we called the checker.
642-
error!(target: "scheduler", { handle = ?node.result_handle }, "Computation missing inputs");
642+
error!(target: "scheduler", { handle = ?hex::encode(&node.result_handle) }, "Computation missing inputs");
643643
return;
644644
}
645645
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,11 @@ async fn upload_transaction_graph_results<'a>(
516516
CoprocessorError::SchedulerError(SchedulerError::MissingInputs)
517517
) {
518518
uncomputable.push((result.handle.clone(), result.transaction_id.clone()));
519+
// Make sure we don't mark this as an error since this simply means that the
520+
// inputs weren't available when we tried scheduling these operations.
521+
// Setting them as uncomputable will postpone them with an exponential backoff
522+
// and they will be retried later.
523+
continue;
519524
}
520525
}
521526
WORKER_ERRORS_COUNTER.inc();

0 commit comments

Comments
 (0)