Skip to content

Commit

Permalink
Delete dummy prover client
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Aug 6, 2024
1 parent 6b64d52 commit 0c612f1
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions yarn-project/prover-client/src/mocks/test_context.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { type BBProverConfig } from '@aztec/bb-prover';
import {
type BlockProver,
type BlockResult,
type ProcessedTx,
type ProvingTicket,
type PublicExecutionRequest,
type ServerCircuitProver,
type Tx,
Expand Down Expand Up @@ -36,31 +34,7 @@ import { MemoryProvingQueue } from '../prover-agent/memory-proving-queue.js';
import { ProverAgent } from '../prover-agent/prover-agent.js';
import { getEnvironmentConfig, getSimulationProvider, makeGlobals } from './fixtures.js';

// TODO(palla/prover-node): Delete this class?
class DummyProverClient implements BlockProver {
constructor(private orchestrator: ProvingOrchestrator) {}
startNewBlock(numTxs: number, globalVariables: GlobalVariables, l1ToL2Messages: Fr[]): Promise<ProvingTicket> {
return this.orchestrator.startNewBlock(numTxs, globalVariables, l1ToL2Messages);
}
addNewTx(tx: ProcessedTx): Promise<void> {
return this.orchestrator.addNewTx(tx);
}
cancelBlock(): void {
return this.orchestrator.cancelBlock();
}
finaliseBlock(): Promise<BlockResult> {
return this.orchestrator.finaliseBlock();
}
setBlockCompleted(): Promise<void> {
return this.orchestrator.setBlockCompleted();
}
getProverId(): Fr {
return this.orchestrator.getProverId();
}
}

export class TestContext {
public blockProver: BlockProver;
constructor(
public publicExecutor: MockProxy<PublicExecutor>,
public publicContractsDB: MockProxy<ContractsDataSourcePublicDB>,
Expand All @@ -75,8 +49,10 @@ export class TestContext {
public blockNumber: number,
public directoriesToCleanup: string[],
public logger: DebugLogger,
) {
this.blockProver = new DummyProverClient(this.orchestrator);
) {}

public get blockProver() {
return this.orchestrator;
}

static async new(
Expand Down

0 comments on commit 0c612f1

Please sign in to comment.