Skip to content

Commit 0d4690a

Browse files
committed
Clarify keyset invariant and rotation TODO
1 parent 94453d7 commit 0d4690a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

coprocessor/fhevm-engine/sns-worker/src/executor.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ pub(crate) async fn run_loop(
232232
continue;
233233
}
234234

235+
// keys is guaranteed by the branch above; panic here if that invariant ever regresses.
235236
let (_, keys) = keys.as_ref().expect("keyset should be available");
236237

237238
let (maybe_remaining, _tasks_processed) =
@@ -459,8 +460,8 @@ pub async fn query_sns_tasks(
459460
let transaction_id: Option<Vec<u8>> = record.try_get("transaction_id")?;
460461

461462
Ok(HandleItem {
462-
// NOTE: Ensure all coprocessors use the same key_id during rotation
463-
// to keep ciphertext_digest consensus on the gateway.
463+
// TODO: During key rotation, ensure all coprocessors pin the same key_id for a batch
464+
// (e.g., via gateway coordination) to keep ciphertext_digest consistent.
464465
key_id: key_id.clone(),
465466
host_chain_id,
466467
handle: handle.clone(),

0 commit comments

Comments
 (0)