Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type {
RECURSIVE_PROOF_LENGTH,
} from '@aztec/constants';
import { EpochNumber } from '@aztec/foundation/branded-types';
import { sha256 } from '@aztec/foundation/crypto/sha256';
import { type Logger, type LoggerBindings, createLogger } from '@aztec/foundation/log';
import { type PromiseWithResolvers, RunningPromise, promiseWithResolvers } from '@aztec/foundation/promise';
import { truncate } from '@aztec/foundation/string';
Expand Down Expand Up @@ -46,6 +45,8 @@ import type {
TxRollupPublicInputs,
} from '@aztec/stdlib/rollup';

import { createHash } from 'node:crypto';

import { InlineProofStore, type ProofStore } from './proof_store/index.js';

// Perform a snapshot sync every 30 seconds
Expand Down Expand Up @@ -659,8 +660,12 @@ export class BrokerCircuitProverFacade implements ServerCircuitProver {
);
}

private generateId(type: ProvingRequestType, inputs: { toBuffer(): Buffer }, epochNumber = EpochNumber.ZERO) {
const inputsHash = sha256(inputs.toBuffer());
return makeProvingJobId(epochNumber, type, inputsHash.toString('hex'));
private generateId(
type: ProvingRequestType,
inputs: { toBuffer(): Buffer },
epochNumber = EpochNumber.ZERO,
): ProvingJobId {
const inputsHash = createHash('sha256').update(inputs.toBuffer()).digest('hex');
return makeProvingJobId(epochNumber, type, inputsHash);
}
}
Loading