Skip to content

Commit

Permalink
fix: prover agents (#7812)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr authored Aug 7, 2024
1 parent fca0d12 commit 215b2c3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
6 changes: 5 additions & 1 deletion yarn-project/aztec/terraform/node/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,11 @@ resource "aws_ecs_task_definition" "aztec-node" {
value = tostring(var.P2P_TX_POOL_KEEP_PROVEN_FOR)
},
{
name = "PROVER_AGENTS"
name = "PROVER_AGENT_ENABLED"
value = "false"
},
{
name = "PROVER_AGENT_CONCURRENCY",
value = "0"
},
{
Expand Down
6 changes: 5 additions & 1 deletion yarn-project/aztec/terraform/prover/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ resource "aws_ecs_task_definition" "aztec-proving-agent" {
"value": "http://${var.DEPLOY_TAG}-aztec-node-${count.index + 1}.local/${var.DEPLOY_TAG}/aztec-node-${count.index + 1}/${var.API_KEY}"
},
{
"name": "PROVER_AGENTS",
"name": "PROVER_AGENT_ENABLED",
"value": "true"
},
{
"name": "PROVER_AGENT_CONCURRENCY",
"value": "1"
},
{
Expand Down
11 changes: 7 additions & 4 deletions yarn-project/prover-client/src/prover-agent/prover-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ export class ProverAgent {
const now = process.hrtime.bigint();

if (now - lastPrint >= PRINT_THRESHOLD_NS) {
const jobs = Array.from(this.inFlightPromises.values())
.map(job => `id=${job.id},type=${ProvingRequestType[job.type]}`)
.join(' ');
this.log.info(`Agent is running with ${this.inFlightPromises.size} in-flight jobs: ${jobs}`);
// only log if we're actually doing work
if (this.inFlightPromises.size > 0) {
const jobs = Array.from(this.inFlightPromises.values())
.map(job => `id=${job.id},type=${ProvingRequestType[job.type]}`)
.join(' ');
this.log.info(`Agent is running with ${this.inFlightPromises.size} in-flight jobs: ${jobs}`);
}
lastPrint = now;
}

Expand Down

0 comments on commit 215b2c3

Please sign in to comment.