diff --git a/yarn-project/txe/src/oracle/txe_oracle.ts b/yarn-project/txe/src/oracle/txe_oracle.ts index cdd706c457a9..3b1740e07fa4 100644 --- a/yarn-project/txe/src/oracle/txe_oracle.ts +++ b/yarn-project/txe/src/oracle/txe_oracle.ts @@ -22,7 +22,6 @@ import { CallContext, type ContractInstance, type ContractInstanceWithAddress, - DEPLOYER_CONTRACT_ADDRESS, Gas, GasFees, GlobalVariables, @@ -888,7 +887,6 @@ export class TXE implements TypedOracle { const executionRequest = new PublicExecutionRequest(callContext, args); const db = this.baseFork; - const worldStateDb = new TXEWorldStateDB(db, new TXEPublicContractDataSource(this), this); const globalVariables = GlobalVariables.empty(); globalVariables.chainId = new Fr(await this.node.getChainId()); @@ -896,28 +894,9 @@ export class TXE implements TypedOracle { globalVariables.blockNumber = new Fr(this.blockNumber); globalVariables.gasFees = new GasFees(1, 1); - const tempFork = await this.nativeWorldStateService.fork(); - // Apply current public data writes - await tempFork.sequentialInsert( - MerkleTreeId.PUBLIC_DATA_TREE, - this.publicDataWrites.map(p => p.toBuffer()), - ); - - // If the contract instance exists in the TXE's world state, make sure its nullifier is present in the tree - // so its nullifier check passes. - if ((await worldStateDb.getContractInstance(callContext.contractAddress)) !== undefined) { - const contractAddressNullifier = await siloNullifier( - AztecAddress.fromNumber(DEPLOYER_CONTRACT_ADDRESS), - callContext.contractAddress.toField(), - ); - if ((await worldStateDb.getNullifierIndex(contractAddressNullifier)) === undefined) { - await tempFork.batchInsert(MerkleTreeId.NULLIFIER_TREE, [contractAddressNullifier.toBuffer()], 0); - } - } - const simulator = new PublicTxSimulator( - tempFork, - new TXEWorldStateDB(tempFork, new TXEPublicContractDataSource(this), this), + db, + new TXEWorldStateDB(db, new TXEPublicContractDataSource(this), this), globalVariables, ); @@ -954,7 +933,6 @@ export class TXE implements TypedOracle { ), ); - await tempFork.close(); return Promise.resolve(result); }