From b5bb9fbf393f52c47d33ba071909cfdceed50753 Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Wed, 27 Nov 2024 13:48:57 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Santiago Palladino --- yarn-project/aztec/src/cli/cmds/start_prover_agent.ts | 2 +- .../prover-client/src/proving_broker/caching_broker_facade.ts | 2 +- yarn-project/prover-client/src/tx-prover/tx-prover.ts | 1 - yarn-project/prover-node/src/prover-cache/cache_manager.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/yarn-project/aztec/src/cli/cmds/start_prover_agent.ts b/yarn-project/aztec/src/cli/cmds/start_prover_agent.ts index 7e27676b1e06..3ae24df0ad9b 100644 --- a/yarn-project/aztec/src/cli/cmds/start_prover_agent.ts +++ b/yarn-project/aztec/src/cli/cmds/start_prover_agent.ts @@ -25,7 +25,7 @@ export async function startProverAgent( ...extractRelevantOptions(options, proverAgentConfigMappings, 'proverAgent'), // override with command line options }; - if (config.realProofs && (!config.bbBinaryPath || config.acvmBinaryPath)) { + if (config.realProofs && (!config.bbBinaryPath || !config.acvmBinaryPath)) { process.exit(1); } diff --git a/yarn-project/prover-client/src/proving_broker/caching_broker_facade.ts b/yarn-project/prover-client/src/proving_broker/caching_broker_facade.ts index c6c0356709c2..7ead3ff334f1 100644 --- a/yarn-project/prover-client/src/proving_broker/caching_broker_facade.ts +++ b/yarn-project/prover-client/src/proving_broker/caching_broker_facade.ts @@ -81,13 +81,13 @@ export class CachingBrokerFacade implements ServerCircuitProver { if (!jobEnqueued) { try { - await this.cache.setProvingJobStatus(id, { status: 'in-queue' }); const inputsUri = await this.proofStore.saveProofInput(id, type, inputs); await this.broker.enqueueProvingJob({ id, type, inputsUri, }); + await this.cache.setProvingJobStatus(id, { status: 'in-queue' }); } catch (err) { await this.cache.setProvingJobStatus(id, { status: 'not-found' }); throw err; diff --git a/yarn-project/prover-client/src/tx-prover/tx-prover.ts b/yarn-project/prover-client/src/tx-prover/tx-prover.ts index 121af71c8014..9bd34df56ca2 100644 --- a/yarn-project/prover-client/src/tx-prover/tx-prover.ts +++ b/yarn-project/prover-client/src/tx-prover/tx-prover.ts @@ -99,7 +99,6 @@ export class TxProver implements EpochProverManager { } this.running = false; await this.stopAgents(); - // TODO(palla/prover-node): Keep a reference to all proving orchestrators that are alive and stop them? } /** diff --git a/yarn-project/prover-node/src/prover-cache/cache_manager.ts b/yarn-project/prover-node/src/prover-cache/cache_manager.ts index c5583a48d8c1..d2b08e3bab4c 100644 --- a/yarn-project/prover-node/src/prover-cache/cache_manager.ts +++ b/yarn-project/prover-node/src/prover-cache/cache_manager.ts @@ -37,7 +37,7 @@ export class ProverCacheManager { return new KVProverCache(store); } - public async removedStaleCaches(currentEpochNumber: bigint): Promise { + public async removeStaleCaches(currentEpochNumber: bigint): Promise { if (!this.cacheDir) { return; }