def __init__(self, db=None, evm_config=None): self.db = db or InMemoryDb() self.__cluster_config = ClusterConfig() self.evm_config = evm_config or get_default_evm_config() self.evm_config["NETWORK_ID"] = self.quark_chain_config.NETWORK_ID self.evm_env = EvmEnv(db=self.db, config=self.evm_config)
"currentGasLimit": "0x7fffffffffffffff", "currentNumber": "0x01", "currentTimestamp": "0x03e8", "previousHash": "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" } configs = { # "Frontier": config_frontier, # "Homestead": config_homestead, # "EIP150": config_tangerine, # "EIP158": config_spurious, "Byzantium": get_default_evm_config() } # Makes a diff between a prev and post state def mk_state_diff(prev, post): o = {} for k in prev.keys(): if k not in post: o[k] = ["-", prev[k]] for k in post.keys(): if k not in prev: o[k] = ["+", post[k]] elif prev[k] != post[k]: ok = {}
if blknum not in fake_headers: fake_headers[blknum] = FakeHeader(sha3(to_string(blknum))) return fake_headers[blknum] basic_env = { "currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty": "0x020000", "currentGasLimit": "0x7fffffffffffffff", "currentNumber": "0x01", "currentTimestamp": "0x03e8", "previousHash": "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", } evm_config = get_default_evm_config() network_to_test = {"ConstantinopleFix"} # Makes a diff between a prev and post state def mk_state_diff(prev, post): o = {} for k in prev.keys(): if k not in post: o[k] = ["-", prev[k]] for k in post.keys(): if k not in prev: o[k] = ["+", post[k]] elif prev[k] != post[k]: ok = {}