diff --git a/yarn-project/end-to-end/Earthfile b/yarn-project/end-to-end/Earthfile index 3a9c18ff04b..49dbde955ce 100644 --- a/yarn-project/end-to-end/Earthfile +++ b/yarn-project/end-to-end/Earthfile @@ -6,9 +6,11 @@ E2E_COMPOSE_TEST: ARG compose_file=./scripts/docker-compose.yml ARG debug="aztec:*" ARG EARTHLY_TARGET_NAME + ARG prover_agents=10 LOCALLY ENV TEST=$test ENV DEBUG=$debug + ENV PROVER_AGENTS=$prover_agents LET project_name=$(echo $test | sed 's/\./_/g') IF docker compose > /dev/null 2>&1 LET CMD="docker compose" diff --git a/yarn-project/prover-client/src/prover-pool/prover-pool.ts b/yarn-project/prover-client/src/prover-pool/prover-pool.ts index 0750b41520e..4916e3e98a4 100644 --- a/yarn-project/prover-client/src/prover-pool/prover-pool.ts +++ b/yarn-project/prover-client/src/prover-pool/prover-pool.ts @@ -1,4 +1,5 @@ import { type ProvingJobSource } from '@aztec/circuit-types'; +import { sleep } from '@aztec/foundation/sleep'; import { type SimulationProvider } from '@aztec/simulator'; import { mkdtemp } from 'fs/promises'; @@ -33,6 +34,8 @@ export class ProverPool { for (const agent of this.agents) { agent.start(source); + // stagger that start of each agent to avoid contention + await sleep(10); } } 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 e5b08a74560..88f987e8124 100644 --- a/yarn-project/prover-client/src/tx-prover/tx-prover.ts +++ b/yarn-project/prover-client/src/tx-prover/tx-prover.ts @@ -68,9 +68,9 @@ export class TxProver implements ProverClient { throw new Error(); } - pool = ProverPool.nativePool(config, config.proverAgents, 10); + pool = ProverPool.nativePool(config, config.proverAgents, 50); } else { - pool = ProverPool.testPool(simulationProvider, config.proverAgents, 10); + pool = ProverPool.testPool(simulationProvider, config.proverAgents, 50); } const prover = new TxProver(worldStateSynchronizer, getVerificationKeys(), pool);