Skip to content

Commit 85139fa

Browse files
committed
fix(coprocessor): do not update dependence chain last_updated_at on release
1 parent c1b7b44 commit 85139fa

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

coprocessor/fhevm-engine/.sqlx/query-aab520e6ce550c4dec799427739a68d0388c50a8b842be000d9c804fe17eba9e.json renamed to coprocessor/fhevm-engine/.sqlx/query-94e9cb426316068aa285da33e7fd1dfa34bf30db25bcf69a333a341b17b5557a.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,6 @@ impl LockMngr {
279279
WHEN status = 'processing' AND $3::bool THEN 'processed' -- mark as processed
280280
WHEN status = 'processing' AND NOT $3::bool THEN 'updated' -- revert to updated so it can be re-acquired
281281
ELSE status
282-
END,
283-
last_updated_at = CASE
284-
WHEN status = 'processing' THEN NOW()
285-
ELSE last_updated_at
286282
END
287283
WHERE worker_id = $1
288284
AND dependence_chain_id = $2

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ async fn query_ciphertexts<'a>(
292292
error!(target: "tfhe_worker", { error = %err }, "error while querying ciphertexts");
293293
err
294294
})?;
295-
296295
s.end();
297296
// index ciphertexts in hashmap
298297
let mut ciphertext_map: HashMap<Vec<u8>, (i16, Vec<u8>)> =
@@ -559,6 +558,12 @@ async fn build_transaction_graph_and_execute<'a>(
559558
let cts_to_query = tx_graph.needed_map.keys().cloned().collect::<Vec<_>>();
560559
let ciphertext_map =
561560
query_ciphertexts(&cts_to_query, *tenant_id, trx, tracer, loop_ctx).await?;
561+
// Check if we retrieved all needed CTs - if not, we may not want to proceed to execution
562+
if cts_to_query.len() != ciphertext_map.len() {
563+
warn!(target: "tfhe_worker", { missing_inputs = ?(cts_to_query.len() - ciphertext_map.len()) }, "some inputs are missing to execute the dependence chain");
564+
return Ok(tx_graph);
565+
}
566+
562567
for (handle, (ct_type, mut ct)) in ciphertext_map.into_iter() {
563568
tx_graph.add_input(
564569
&handle,

0 commit comments

Comments
 (0)