@ -77,7 +77,9 @@ public class EVMExecutor {
private OperationTracer tracer = OperationTracer . NO_TRACING ;
private boolean requireDeposit = true ;
private List < ContractValidationRule > contractValidationRules =
List . of ( MaxCodeSizeRule . from ( EvmSpecVersion . SPURIOUS_DRAGON ) , PrefixCodeRule . of ( ) ) ;
List . of (
MaxCodeSizeRule . from ( EvmSpecVersion . SPURIOUS_DRAGON , EvmConfiguration . DEFAULT ) ,
PrefixCodeRule . of ( ) ) ;
private long initialNonce = 1 ;
private Collection < Address > forceCommitAddresses = List . of ( Address . fromHexString ( "0x03" ) ) ;
private Set < Address > accessListWarmAddresses = new BytesTrieSet < > ( Address . SIZE ) ;
@ -241,8 +243,7 @@ public class EVMExecutor {
final EVMExecutor executor = new EVMExecutor ( MainnetEVMs . spuriousDragon ( evmConfiguration ) ) ;
executor . precompileContractRegistry =
MainnetPrecompiledContracts . frontier ( executor . evm . getGasCalculator ( ) ) ;
executor . contractValidationRules =
List . of ( MaxCodeSizeRule . from ( EvmSpecVersion . SPURIOUS_DRAGON ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( executor . evm ) ) ;
return executor ;
}
@ -256,7 +257,7 @@ public class EVMExecutor {
final EVMExecutor executor = new EVMExecutor ( MainnetEVMs . byzantium ( evmConfiguration ) ) ;
executor . precompileContractRegistry =
MainnetPrecompiledContracts . byzantium ( executor . evm . getGasCalculator ( ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( EvmSpecVersion . BYZANTIUM ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( executor . evm ) ) ;
return executor ;
}
@ -270,7 +271,7 @@ public class EVMExecutor {
final EVMExecutor executor = new EVMExecutor ( MainnetEVMs . constantinople ( evmConfiguration ) ) ;
executor . precompileContractRegistry =
MainnetPrecompiledContracts . byzantium ( executor . evm . getGasCalculator ( ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( EvmSpecVersion . CONSTANTINOPLE ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( executor . evm ) ) ;
return executor ;
}
@ -284,7 +285,7 @@ public class EVMExecutor {
final EVMExecutor executor = new EVMExecutor ( MainnetEVMs . petersburg ( evmConfiguration ) ) ;
executor . precompileContractRegistry =
MainnetPrecompiledContracts . byzantium ( executor . evm . getGasCalculator ( ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( EvmSpecVersion . PETERSBURG ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( executor . evm ) ) ;
return executor ;
}
@ -319,7 +320,7 @@ public class EVMExecutor {
final EVMExecutor executor = new EVMExecutor ( MainnetEVMs . istanbul ( chainId , evmConfiguration ) ) ;
executor . precompileContractRegistry =
MainnetPrecompiledContracts . istanbul ( executor . evm . getGasCalculator ( ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( EvmSpecVersion . ISTANBUL ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( executor . evm ) ) ;
return executor ;
}
@ -354,7 +355,7 @@ public class EVMExecutor {
final EVMExecutor executor = new EVMExecutor ( MainnetEVMs . berlin ( chainId , evmConfiguration ) ) ;
executor . precompileContractRegistry =
MainnetPrecompiledContracts . istanbul ( executor . evm . getGasCalculator ( ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( EvmSpecVersion . BERLIN ) ) ;
executor . contractValidationRules = List . of ( MaxCodeSizeRule . from ( executor . evm ) ) ;
return executor ;
}