From 3be402cca4fc1451a2b4c7560c346843eb8439cd Mon Sep 17 00:00:00 2001 From: Facundo Date: Fri, 12 Apr 2024 14:07:39 +0100 Subject: [PATCH] chore(public): remove getNullifierMembershipWitness (#5715) Remove getNullifierMembershipWitness oracle implementation from PUBLIC since it should not be used there. Nullifier checks are done through checkNullifierExists. --- .../src/public/public_execution_context.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/yarn-project/simulator/src/public/public_execution_context.ts b/yarn-project/simulator/src/public/public_execution_context.ts index b681df3f95a..20e41a12db6 100644 --- a/yarn-project/simulator/src/public/public_execution_context.ts +++ b/yarn-project/simulator/src/public/public_execution_context.ts @@ -1,8 +1,4 @@ -import { - type NullifierMembershipWitness, - UnencryptedFunctionL2Logs, - type UnencryptedL2Log, -} from '@aztec/circuit-types'; +import { UnencryptedFunctionL2Logs, type UnencryptedL2Log } from '@aztec/circuit-types'; import { CallContext, FunctionData, @@ -259,16 +255,6 @@ export class PublicExecutionContext extends TypedOracle { return childExecutionResult.returnValues; } - public async getNullifierMembershipWitness( - blockNumber: number, - nullifier: Fr, - ): Promise { - if (!this.header.globalVariables.blockNumber.equals(new Fr(blockNumber))) { - throw new Error(`Public execution oracle can only access nullifier membership witnesses for the current block`); - } - return await this.commitmentsDb.getNullifierMembershipWitnessAtLatestBlock(nullifier); - } - public async checkNullifierExists(nullifier: Fr): Promise { const witness = await this.commitmentsDb.getNullifierMembershipWitnessAtLatestBlock(nullifier); return !!witness;