Skip to content

Commit 4954034

Browse files
author
sklppy88
committed
removing shit
1 parent dcc7a7d commit 4954034

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

yarn-project/txe/src/oracle/txe_oracle.ts

+2-24
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
CallContext,
2323
type ContractInstance,
2424
type ContractInstanceWithAddress,
25-
DEPLOYER_CONTRACT_ADDRESS,
2625
Gas,
2726
GasFees,
2827
GlobalVariables,
@@ -888,36 +887,16 @@ export class TXE implements TypedOracle {
888887
const executionRequest = new PublicExecutionRequest(callContext, args);
889888

890889
const db = this.baseFork;
891-
const worldStateDb = new TXEWorldStateDB(db, new TXEPublicContractDataSource(this), this);
892890

893891
const globalVariables = GlobalVariables.empty();
894892
globalVariables.chainId = new Fr(await this.node.getChainId());
895893
globalVariables.version = new Fr(await this.node.getVersion());
896894
globalVariables.blockNumber = new Fr(this.blockNumber);
897895
globalVariables.gasFees = new GasFees(1, 1);
898896

899-
const tempFork = await this.nativeWorldStateService.fork();
900-
// Apply current public data writes
901-
await tempFork.sequentialInsert(
902-
MerkleTreeId.PUBLIC_DATA_TREE,
903-
this.publicDataWrites.map(p => p.toBuffer()),
904-
);
905-
906-
// If the contract instance exists in the TXE's world state, make sure its nullifier is present in the tree
907-
// so its nullifier check passes.
908-
if ((await worldStateDb.getContractInstance(callContext.contractAddress)) !== undefined) {
909-
const contractAddressNullifier = await siloNullifier(
910-
AztecAddress.fromNumber(DEPLOYER_CONTRACT_ADDRESS),
911-
callContext.contractAddress.toField(),
912-
);
913-
if ((await worldStateDb.getNullifierIndex(contractAddressNullifier)) === undefined) {
914-
await tempFork.batchInsert(MerkleTreeId.NULLIFIER_TREE, [contractAddressNullifier.toBuffer()], 0);
915-
}
916-
}
917-
918897
const simulator = new PublicTxSimulator(
919-
tempFork,
920-
new TXEWorldStateDB(tempFork, new TXEPublicContractDataSource(this), this),
898+
db,
899+
new TXEWorldStateDB(db, new TXEPublicContractDataSource(this), this),
921900
globalVariables,
922901
);
923902

@@ -954,7 +933,6 @@ export class TXE implements TypedOracle {
954933
),
955934
);
956935

957-
await tempFork.close();
958936
return Promise.resolve(result);
959937
}
960938

0 commit comments

Comments
 (0)