Skip to content

Commit

Permalink
chore(public): remove getNullifierMembershipWitness (#5715)
Browse files Browse the repository at this point in the history
Remove getNullifierMembershipWitness oracle implementation from PUBLIC since it should not be used there. Nullifier checks are done through checkNullifierExists.
  • Loading branch information
fcarreiro authored Apr 12, 2024
1 parent 5526b36 commit 3be402c
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions yarn-project/simulator/src/public/public_execution_context.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -259,16 +255,6 @@ export class PublicExecutionContext extends TypedOracle {
return childExecutionResult.returnValues;
}

public async getNullifierMembershipWitness(
blockNumber: number,
nullifier: Fr,
): Promise<NullifierMembershipWitness | undefined> {
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<boolean> {
const witness = await this.commitmentsDb.getNullifierMembershipWitnessAtLatestBlock(nullifier);
return !!witness;
Expand Down

0 comments on commit 3be402c

Please sign in to comment.