Skip to content

Commit

Permalink
chore: Minor logging tweaks (#7879)
Browse files Browse the repository at this point in the history
- In prover agent
- In CLI block number
- On starting prover node
  • Loading branch information
spalladino authored Aug 9, 2024
1 parent fda7c3e commit 00c35c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions yarn-project/aztec/src/cli/cmds/start_prover_node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const startProverNode = async (
proverConfig.l1Contracts?.rollupAddress && !proverConfig.l1Contracts.rollupAddress.isZero();
const nodeUrl = proverConfig.nodeUrl ?? proverConfig.txProviderNodeUrl;
if (nodeUrl && !isRollupAddressSet) {
userLog(`Loading L1 contract addresses from aztec node at ${nodeUrl}`);
proverConfig.l1Contracts = await createAztecNodeClient(nodeUrl).getL1ContractAddresses();
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/cli/src/cmds/pxe/block_number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export async function blockNumber(rpcUrl: string, debugLogger: DebugLogger, log:
const client = await createCompatibleClient(rpcUrl, debugLogger);
const [latestNum, provenNum] = await Promise.all([client.getBlockNumber(), client.getProvenBlockNumber()]);
log(`Latest block: ${latestNum}`);
log(`Proven block: ${provenNum}\n`);
log(`Proven block: ${provenNum}`);
}
6 changes: 3 additions & 3 deletions yarn-project/prover-client/src/prover-agent/prover-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ export class ProverAgent {

private async work(jobSource: ProvingJobSource, job: ProvingJob<ProvingRequest>): Promise<void> {
try {
this.log.info(`Picked up proving job id=${job.id} type=${ProvingRequestType[job.request.type]}`);
this.log.debug(`Picked up proving job id=${job.id} type=${ProvingRequestType[job.request.type]}`);
const [time, result] = await elapsed(this.getProof(job.request));
if (this.isRunning()) {
this.log.verbose(
`Processed proving job id=${job.id} type=${ProvingRequestType[job.request.type]} duration=${time}ms`,
);
await jobSource.resolveProvingJob(job.id, result);
} else {
this.log.debug(
this.log.verbose(
`Dropping proving job id=${job.id} type=${
ProvingRequestType[job.request.type]
} duration=${time}ms: agent stopped`,
Expand All @@ -145,7 +145,7 @@ export class ProverAgent {
);
await jobSource.rejectProvingJob(job.id, new ProvingError((err as any)?.message ?? String(err)));
} else {
this.log.info(
this.log.verbose(
`Dropping proving job id=${job.id} type=${ProvingRequestType[job.request.type]}: agent stopped: ${
(err as any).stack || err
}`,
Expand Down

0 comments on commit 00c35c0

Please sign in to comment.