Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Less noisy AVM failures in proving #8227

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions yarn-project/prover-client/src/orchestrator/orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,9 @@ export class ProvingOrchestrator implements BlockProver {
if (process.env.AVM_PROVING_STRICT) {
throw err;
} else {
logger.warn(`Error thrown when proving AVM circuit: ${err}`);
logger.warn(`AVM_PROVING_STRICT is off, faking AVM proof and carrying on...`);
logger.warn(
`Error thrown when proving AVM circuit, but AVM_PROVING_STRICT is off, so faking AVM proof and carrying on. Error: ${err}.`,
);
return { proof: makeEmptyProof(), verificationKey: VerificationKeyData.makeFake() };
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ export class MemoryProvingQueue implements ServerCircuitProver, ProvingJobSource
);
this.queue.put(job);
} else {
this.log.error(`Job id=${job.id} type=${ProvingRequestType[job.request.type]} failed with error: ${err}`);
const logFn =
job.request.type === ProvingRequestType.PUBLIC_VM && !process.env.AVM_PROVING_STRICT
? this.log.warn
: this.log.error;
Comment on lines +183 to +184
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 great idea!

logFn(`Job id=${job.id} type=${ProvingRequestType[job.request.type]} failed with error: ${err}`);
job.reject(err);
}
return Promise.resolve();
Expand Down
18 changes: 7 additions & 11 deletions yarn-project/prover-client/src/prover-agent/prover-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,16 @@ export class ProverAgent {
);
}
} catch (err) {
const type = ProvingRequestType[job.request.type];
if (this.isRunning()) {
this.log.error(
`Error processing proving job id=${job.id} type=${ProvingRequestType[job.request.type]}: ${
(err as any).stack || err
}`,
err,
);
if (job.request.type === ProvingRequestType.PUBLIC_VM && !process.env.AVM_PROVING_STRICT) {
this.log.error(`Error processing proving job id=${job.id} type=${type}: ${err}`, err);
} else {
this.log.warn(`Ignoring error processing proving job id=${job.id} type=${type}: ${err}`);
}
await jobSource.rejectProvingJob(job.id, new ProvingError((err as any)?.message ?? String(err)));
} else {
this.log.verbose(
`Dropping proving job id=${job.id} type=${ProvingRequestType[job.request.type]}: agent stopped: ${
(err as any).stack || err
}`,
);
this.log.verbose(`Dropping proving job id=${job.id} type=${type}: agent stopped: ${(err as any).stack || err}`);
}
}
}
Expand Down
Loading