@@ -22,7 +22,6 @@ import {
22
22
CallContext ,
23
23
type ContractInstance ,
24
24
type ContractInstanceWithAddress ,
25
- DEPLOYER_CONTRACT_ADDRESS ,
26
25
Gas ,
27
26
GasFees ,
28
27
GlobalVariables ,
@@ -888,36 +887,16 @@ export class TXE implements TypedOracle {
888
887
const executionRequest = new PublicExecutionRequest ( callContext , args ) ;
889
888
890
889
const db = this . baseFork ;
891
- const worldStateDb = new TXEWorldStateDB ( db , new TXEPublicContractDataSource ( this ) , this ) ;
892
890
893
891
const globalVariables = GlobalVariables . empty ( ) ;
894
892
globalVariables . chainId = new Fr ( await this . node . getChainId ( ) ) ;
895
893
globalVariables . version = new Fr ( await this . node . getVersion ( ) ) ;
896
894
globalVariables . blockNumber = new Fr ( this . blockNumber ) ;
897
895
globalVariables . gasFees = new GasFees ( 1 , 1 ) ;
898
896
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
-
918
897
const simulator = new PublicTxSimulator (
919
- tempFork ,
920
- new TXEWorldStateDB ( tempFork , new TXEPublicContractDataSource ( this ) , this ) ,
898
+ db ,
899
+ new TXEWorldStateDB ( db , new TXEPublicContractDataSource ( this ) , this ) ,
921
900
globalVariables ,
922
901
) ;
923
902
@@ -954,7 +933,6 @@ export class TXE implements TypedOracle {
954
933
) ,
955
934
) ;
956
935
957
- await tempFork . close ( ) ;
958
936
return Promise . resolve ( result ) ;
959
937
}
960
938
0 commit comments