From b49489a8d69c542d358c46d835cc2858ff283d4e Mon Sep 17 00:00:00 2001 From: Christoph Burgdorf Date: Tue, 20 Nov 2018 15:20:42 +0100 Subject: [PATCH 1/8] Upgrade tests to v6.0.0-beta.2 --- fixtures | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixtures b/fixtures index 95a3092038..420f443477 160000 --- a/fixtures +++ b/fixtures @@ -1 +1 @@ -Subproject commit 95a309203890e6244c6d4353ca411671973c13b5 +Subproject commit 420f443477caa8516f1f9ee8122fafc3415c0f34 From c9f03ece055068681ecc86b79e309d092d54a640 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Thu, 13 Dec 2018 01:27:40 +0200 Subject: [PATCH 2/8] tests: Enable Constantinople transaction tests. --- tests/json-fixtures/test_transactions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/json-fixtures/test_transactions.py b/tests/json-fixtures/test_transactions.py index 26d7a18395..3051bb2cdc 100644 --- a/tests/json-fixtures/test_transactions.py +++ b/tests/json-fixtures/test_transactions.py @@ -28,6 +28,9 @@ from eth.vm.forks.byzantium.transactions import ( ByzantiumTransaction ) +from eth.vm.forks.constantinople.transactions import ( + ConstantinopleTransaction +) from eth_typing.enums import ( ForkName @@ -92,7 +95,7 @@ def fixture_transaction_class(fixture_data): elif fork_name == ForkName.Byzantium: return ByzantiumTransaction elif fork_name == ForkName.Constantinople: - pytest.skip("Constantinople Transaction class has not been implemented") + return ConstantinopleTransaction elif fork_name == ForkName.Metropolis: pytest.skip("Metropolis Transaction class has not been implemented") else: From 8c8304d667df755acb7211fbbc8c7455b48f363b Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Fri, 7 Dec 2018 22:11:19 +0200 Subject: [PATCH 3/8] tests: include missing Constantinople tests. 2 COMMITS SQUASHED: fixtures: include missing Constantinople in helpers. Debugging CREATE2 using the full "Blockchain" tests in `fixtures` (they are disabled in `py-evm`, because they're slow and a duplication of "State" tests). A few definitions are missing - so add them. tests/conftest: fix VM-tracing log-to-file helper. Also move `import`s out of the helper, so they're not encountered by the interpreter on every invocation of the helper. --- eth/tools/fixtures/helpers.py | 5 +++++ tests/conftest.py | 7 +++++-- tests/json-fixtures/test_blockchain.py | 2 -- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/eth/tools/fixtures/helpers.py b/eth/tools/fixtures/helpers.py index 099d61c928..6f00efe16f 100644 --- a/eth/tools/fixtures/helpers.py +++ b/eth/tools/fixtures/helpers.py @@ -40,6 +40,7 @@ BaseVM, ) from eth.vm.forks import ( + ConstantinopleVM, ByzantiumVM, TangerineWhistleVM, FrontierVM, @@ -123,6 +124,10 @@ def chain_vm_configuration(fixture: Dict[str, Any]) -> Iterable[Tuple[int, Type[ return ( (0, ByzantiumVM), ) + elif network == 'Constantinople': + return ( + (0, ConstantinopleVM), + ) elif network == 'FrontierToHomesteadAt5': HomesteadVM = BaseHomesteadVM.configure(support_dao_fork=False) return ( diff --git a/tests/conftest.py b/tests/conftest.py index 15832ad451..983c12d5ad 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -23,10 +23,13 @@ # Uncomment this to have logs from tests written to a file. This is useful for # debugging when you need to dump the VM output from test runs. """ +import datetime +import logging +import os +from eth.tools.logging import TRACE_LEVEL_NUM + @pytest.yield_fixture(autouse=True) def _file_logging(request): - import datetime - import os logger = logging.getLogger('eth') diff --git a/tests/json-fixtures/test_blockchain.py b/tests/json-fixtures/test_blockchain.py index 5e914e9be2..be232fd2f9 100644 --- a/tests/json-fixtures/test_blockchain.py +++ b/tests/json-fixtures/test_blockchain.py @@ -187,8 +187,6 @@ def fixture(fixture_data): fixture_key, normalize_blockchain_fixtures, ) - if fixture['network'] == 'Constantinople': - pytest.skip('Constantinople VM rules not yet supported') return fixture From 55b2a06fb784b4e745594ed560453579dccfa7d9 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Thu, 13 Dec 2018 02:00:46 +0200 Subject: [PATCH 4/8] circleci: revive/rework enabling Constantinople runs on CI. This used to be a commit by @cburgdorf, but it got eaten in the rebase (as it had most of the conflicts). --- .circleci/config.yml | 21 +++++++++++++++++++++ tox.ini | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c6fc615ceb..30b07f1139 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,6 +108,12 @@ jobs: - image: circleci/python:3.5 environment: TOXENV: py35-native-blockchain-byzantium + py35-native-blockchain-constantinople: + <<: *common + docker: + - image: circleci/python:3.5 + environment: + TOXENV: py35-native-blockchain-constantinople py35-native-blockchain-frontier: <<: *common docker: @@ -175,6 +181,12 @@ jobs: - image: circleci/python:3.6 environment: TOXENV: py36-native-blockchain-byzantium + py36-native-blockchain-constantinople: + <<: *common + docker: + - image: circleci/python:3.6 + environment: + TOXENV: py36-native-blockchain-constantinople py36-native-blockchain-frontier: <<: *common docker: @@ -211,6 +223,12 @@ jobs: - image: circleci/python:3.6 environment: TOXENV: py36-rpc-state-byzantium + py36-rpc-state-constantinople: + <<: *common + docker: + - image: circleci/python:3.6 + environment: + TOXENV: py36-rpc-state-constantinople py36-rpc-state-frontier: <<: *common docker: @@ -340,12 +358,14 @@ workflows: - py37-beacon - py36-native-blockchain-byzantium + - py36-native-blockchain-constantinople - py36-native-blockchain-frontier - py36-native-blockchain-homestead - py36-native-blockchain-eip150 - py36-native-blockchain-eip158 - py36-native-blockchain-transition - py36-rpc-state-byzantium + - py36-rpc-state-constantinople - py36-rpc-state-frontier - py36-rpc-state-homestead - py36-rpc-state-eip150 @@ -364,6 +384,7 @@ workflows: - py36-beacon - py35-native-blockchain-byzantium + - py35-native-blockchain-constantinople - py35-native-blockchain-frontier - py35-native-blockchain-homestead - py35-native-blockchain-eip150 diff --git a/tox.ini b/tox.ini index 392867c3f2..1d4fac167d 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist= py{35,36}-{core,database,transactions,vm} py{36}-{benchmark,p2p,trinity,lightchain_integration,beacon} py{36}-rpc-blockchain - py{36}-rpc-state-{frontier,homestead,eip150,eip158,byzantium,quadratic} + py{36}-rpc-state-{frontier,homestead,eip150,eip158,byzantium,constantinople,quadratic} py{35,36}-native-blockchain-{frontier,homestead,eip150,eip158,byzantium,constantinople,metropolis,transition} py37-{core,trinity,trinity-integration,beacon} py{35,36}-lint @@ -32,6 +32,8 @@ commands= beacon: pytest {posargs:tests/beacon/} # The following test seems to consume a lot of memory. Restricting to 3 processes reduces crashes rpc-state-byzantium: pytest -n3 {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and not stQuadraticComplexityTest and Byzantium'} + # Uncomment the next line + modify test_rpc_fixtures.py when Constantinople is included in the mainnet config + rpc-state-constantinople: pytest -n3 {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and not stQuadraticComplexityTest and Constantinople'} rpc-state-quadratic: pytest {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and stQuadraticComplexityTest'} transactions: pytest {posargs:tests/json-fixtures/test_transactions.py} vm: pytest {posargs:tests/json-fixtures/test_virtual_machine.py} From 189d347d3f89907e1235b9104dca460372743ac0 Mon Sep 17 00:00:00 2001 From: Piper Merriam Date: Mon, 10 Dec 2018 14:22:33 -0700 Subject: [PATCH 5/8] Fix some failing tests --- eth/__init__.py | 2 +- eth/vm/logic/system.py | 33 ++++++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/eth/__init__.py b/eth/__init__.py index 43770b8a48..773b6f1218 100644 --- a/eth/__init__.py +++ b/eth/__init__.py @@ -21,7 +21,7 @@ # # Ensure we can reach 1024 frames of recursion # -EVM_RECURSION_LIMIT = 1024 * 10 +EVM_RECURSION_LIMIT = 1024 * 12 sys.setrecursionlimit(max(EVM_RECURSION_LIMIT, sys.getrecursionlimit())) diff --git a/eth/vm/logic/system.py b/eth/vm/logic/system.py index 97b45ccd64..e3f12123ef 100644 --- a/eth/vm/logic/system.py +++ b/eth/vm/logic/system.py @@ -20,12 +20,9 @@ ceil32, ) from eth.vm import mnemonics -from eth.vm.computation import ( - BaseComputation -) -from eth.vm.opcode import ( - Opcode, -) +from eth.vm.computation import BaseComputation +from eth.vm.message import Message +from eth.vm.opcode import Opcode from .call import max_child_gas_eip150 @@ -193,13 +190,16 @@ def __call__(self, computation: BaseComputation) -> None: code=call_data, create_address=contract_address, ) + self.apply_create_message(computation, child_msg) + def apply_create_message(self, computation: BaseComputation, child_msg: Message) -> None: child_computation = computation.apply_child_computation(child_msg) if child_computation.is_error: computation.stack_push(0) else: - computation.stack_push(contract_address) + computation.stack_push(child_msg.storage_address) + computation.return_gas(child_computation.get_gas_remaining()) @@ -240,3 +240,22 @@ def generate_contract_address(self, stack_data.salt, call_data ) + + def apply_create_message(self, computation: BaseComputation, child_msg: Message) -> None: + # We need to ensure that creation operates on empty storage **and** + # that if the initialization code fails that we revert the account back + # to its original state root. + snapshot = computation.state.snapshot() + + computation.state.account_db.delete_storage(child_msg.storage_address) + + child_computation = computation.apply_child_computation(child_msg) + + if child_computation.is_error: + computation.state.revert(snapshot) + computation.stack_push(0) + else: + computation.state.commit(snapshot) + computation.stack_push(child_msg.storage_address) + + computation.return_gas(child_computation.get_gas_remaining()) From 067308baa1330ccca97fe47333c52702099facf0 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Wed, 12 Dec 2018 18:21:58 +0200 Subject: [PATCH 6/8] eth/vm: fix accidental override of ensure_no_static() in Constantinople. This made the EVM no longer care that SSTORE within a STATICCALL is forbidden. https://github.com/ethereum/py-evm/pull/1579#issuecomment-446617448 --- eth/vm/forks/constantinople/opcodes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eth/vm/forks/constantinople/opcodes.py b/eth/vm/forks/constantinople/opcodes.py index dce6409d05..76888da7b3 100644 --- a/eth/vm/forks/constantinople/opcodes.py +++ b/eth/vm/forks/constantinople/opcodes.py @@ -11,7 +11,8 @@ opcode_values, ) from eth.vm.forks.byzantium.opcodes import ( - BYZANTIUM_OPCODES + BYZANTIUM_OPCODES, + ensure_no_static ) from eth.vm.forks.constantinople.constants import ( GAS_EXTCODEHASH_EIP1052 @@ -56,7 +57,7 @@ gas_cost=constants.GAS_CREATE, )(), opcode_values.SSTORE: as_opcode( - logic_fn=sstore_eip1283, + logic_fn=ensure_no_static(sstore_eip1283), mnemonic=mnemonics.SSTORE, gas_cost=constants.GAS_NULL, ), From 2b0106821850896a6db3d24f89aa4d2b925f3aa7 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Wed, 12 Dec 2018 01:52:04 +0200 Subject: [PATCH 7/8] tests: add more tests to INCORRECT_UPSTREAM_TESTS. One is existing `RevertInCreateInInit`, but now for Constantinople, not just Byzantium. The other is `RevertInCreateInInitCreate2`, which contains the same "synthhetic" state which can't be arrived at by regular means in the EVM. It's likely a copy-paste atavism. The rest are variants testing specifically for what happens on collisions with a state like above. It has already been estabilished that there are two schools of thought: one with `geth` and `aleth` (and `testeth` that generates the tests); the other with `py-evm` and `parity`. --- tests/json-fixtures/test_blockchain.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/json-fixtures/test_blockchain.py b/tests/json-fixtures/test_blockchain.py index be232fd2f9..3b6cbec619 100644 --- a/tests/json-fixtures/test_blockchain.py +++ b/tests/json-fixtures/test_blockchain.py @@ -125,6 +125,18 @@ # The result is in conflict with the yellow-paper: # * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369 ('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Constantinople'), # noqa: E501 + # The CREATE2 variant seems to have been derived from the one above - it, too, + # has a "synthetic" state, on which py-evm flips. + # * https://github.com/ethereum/py-evm/pull/1181#issuecomment-446330609 + ('GeneralStateTests/stCreate2/RevertInCreateInInitCreate2_d0g0v0.json', 'RevertInCreateInInitCreate2_d0g0v0_Constantinople'), # noqa: E501 + # All four variants have been specifically added to test a collision type + # like the above; therefore, they fail in the same manner. + # * https://github.com/ethereum/py-evm/pull/1579#issuecomment-446591118 + ('GeneralStateTests/stSStoreTest/InitCollision_d0g0v0.json', 'InitCollision_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stSStoreTest/InitCollision_d1g0v0.json', 'InitCollision_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stSStoreTest/InitCollision_d2g0v0.json', 'InitCollision_d2g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stSStoreTest/InitCollision_d3g0v0.json', 'InitCollision_d3g0v0_Constantinople'), # noqa: E501 } From fd537be45bafb2041c45a92f3d5240db2bc7f517 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Thu, 13 Dec 2018 15:34:16 +0200 Subject: [PATCH 8/8] tests/fixtures/blockchain: repopulate SLOWEST_TESTS. SQUASHED: tests/fixtures/blockchain: sort SLOWEST_TESTS alphabetically. ... to reduce line count diff/churn: some are just being moved around needlessly. tests/fixtures/blockchain: add bcForkStressTest to class-disabled. --- tests/json-fixtures/test_blockchain.py | 142 ++++++++++++++----------- 1 file changed, 81 insertions(+), 61 deletions(-) diff --git a/tests/json-fixtures/test_blockchain.py b/tests/json-fixtures/test_blockchain.py index 3b6cbec619..85e8df18e7 100644 --- a/tests/json-fixtures/test_blockchain.py +++ b/tests/json-fixtures/test_blockchain.py @@ -37,80 +37,98 @@ # These are the slowest tests from the full blockchain test run. This list -# should be regenerated occasionally using `--durations 100`. +# should be regenerated occasionally using `--durations 100` - preferably +# several runs, using top N percentile to populate the list incrementally. +# Then sort alphabetically, to reduce churn (lines just being pushed up/down). SLOWEST_TESTS = { - ('GeneralStateTests/stStaticCall/static_Call50000_sha256_d0g0v0.json', 'static_Call50000_sha256_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_sha256_d1g0v0.json', 'static_Call50000_sha256_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_rip160_d0g0v0.json', 'static_Call50000_rip160_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_d1g0v0.json', 'static_Call50000_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_ecrec_d1g0v0.json', 'static_Call50000_ecrec_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_rip160_d1g0v0.json', 'static_Call50000_rip160_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_identity2_d1g0v0.json', 'static_Call50000_identity2_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_identity_d1g0v0.json', 'static_Call50000_identity_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Return50000_2_d0g0v0.json', 'static_Return50000_2_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_d0g0v0.json', 'static_Call50000_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_1_d1g0v0.json', 'static_Call50000bytesContract50_1_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_2_d1g0v0.json', 'static_Call50000bytesContract50_2_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stChangedEIP150/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stChangedEIP150/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_EIP150'), # noqa: E501 - ('GeneralStateTests/stDelegatecallTestHomestead/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_ecrec_d0g0v0.json', 'static_Call50000_ecrec_d0g0v0_Byzantium'), # noqa: E501 ('GeneralStateTests/stAttackTest/ContractCreationSpam_d0g0v0.json', 'ContractCreationSpam_d0g0v0_Frontier'), # noqa: E501 ('GeneralStateTests/stAttackTest/ContractCreationSpam_d0g0v0.json', 'ContractCreationSpam_d0g0v0_Homestead'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/Call1024OOG_d0g0v0.json', 'Call1024OOG_d0g0v0_Frontier'), # noqa: E501 ('GeneralStateTests/stCallCreateCallCodeTest/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2_d0g0v0.json', 'static_Call1024PreCalls2_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_identity2_d0g0v0.json', 'static_Call50000_identity2_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000_identity_d0g0v0.json', 'static_Call50000_identity_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stRecursiveCreate/recursiveCreateReturnValue_d0g0v0.json', 'recursiveCreateReturnValue_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert_d0g0v0.json', 'static_LoopCallsThenRevert_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_Constantinople'), # noqa: E501 ('GeneralStateTests/stCallCreateCallCodeTest/Callcode1024OOG_d0g0v0.json', 'Callcode1024OOG_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert_d0g1v0.json', 'static_LoopCallsThenRevert_d0g1v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call1024PreCalls3_d1g0v0.json', 'static_Call1024PreCalls3_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call1024PreCalls_d1g0v0.json', 'static_Call1024PreCalls_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2_d1g0v0.json', 'static_Call1024PreCalls2_d1g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024OOG_d0g0v0.json', 'Delegatecall1024OOG_d0g0v0_Homestead'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stCallCreateCallCodeTest/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Frontier'), # noqa: E501 ('GeneralStateTests/stChangedEIP150/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBombLog_d0g0v0.json', 'CallRecursiveBombLog_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stChangedEIP150/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 - ('bcForkStressTest/ForkStressTest.json', 'ForkStressTest_Frontier'), # noqa: E501 - ('bcForkStressTest/ForkStressTest.json', 'ForkStressTest_Byzantium'), # noqa: E501 - ('GeneralStateTests/stCallCreateCallCodeTest/Call1024OOG_d0g0v0.json', 'Call1024OOG_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stDelegatecallTestHomestead/Call1024OOG_d0g0v0.json', 'Call1024OOG_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBombLog_d0g0v0.json', 'CallRecursiveBombLog_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb1_d0g0v0.json', 'CallRecursiveBomb1_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBombLog2_d0g0v0.json', 'CallRecursiveBombLog2_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stCallCreateCallCodeTest/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stChangedEIP150/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Constantinople'), # noqa: E501 ('GeneralStateTests/stChangedEIP150/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_EIP150'), # noqa: E501 - ('bcForkStressTest/ForkStressTest.json', 'ForkStressTest_EIP150'), # noqa: E501 - ('GeneralStateTests/stDelegatecallTestHomestead/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stChangedEIP150/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stChangedEIP150/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stChangedEIP150/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_EIP150'), # noqa: E501 + ('GeneralStateTests/stChangedEIP150/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stChangedEIP150/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_Constantinople'), # noqa: E501 ('GeneralStateTests/stChangedEIP150/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_EIP150'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb1_d0g0v0.json', 'CallRecursiveBomb1_d0g0v0_Homestead'), # noqa: E501 + ('GeneralStateTests/stCreate2/Create2Recursive_d0g0v0.json', 'Create2Recursive_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stCreate2/Create2Recursive_d0g1v0.json', 'Create2Recursive_d0g1v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stDelegatecallTestHomestead/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stDelegatecallTestHomestead/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stDelegatecallTestHomestead/Call1024OOG_d0g0v0.json', 'Call1024OOG_d0g0v0_Homestead'), # noqa: E501 + ('GeneralStateTests/stDelegatecallTestHomestead/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stDelegatecallTestHomestead/Call1024PreCalls_d0g0v0.json', 'Call1024PreCalls_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stDelegatecallTestHomestead/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Constantinople'), # noqa: E501 ('GeneralStateTests/stDelegatecallTestHomestead/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb2_d0g0v0.json', 'CallRecursiveBomb2_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stCallCreateCallCodeTest/Callcode1024BalanceTooLow_d0g0v0.json', 'Callcode1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/ABAcalls2_d0g0v0.json', 'ABAcalls2_d0g0v0_Frontier'), # noqa: E501 ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024_d0g0v0.json', 'Delegatecall1024_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBombLog2_d0g0v0.json', 'CallRecursiveBombLog2_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb2_d0g0v0.json', 'CallRecursiveBomb2_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_EIP150'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_d0g0v0.json', 'CallRecursiveBomb0_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stDelegatecallTestHomestead/Call1024BalanceTooLow_d0g0v0.json', 'Call1024BalanceTooLow_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_d0g0v0.json', 'CallRecursiveBomb0_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_1_d0g0v0.json', 'static_Call50000bytesContract50_1_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024_d0g0v0.json', 'Delegatecall1024_d0g0v0_Constantinople'), # noqa: E501 ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024_d0g0v0.json', 'Delegatecall1024_d0g0v0_EIP150'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stCallCreateCallCodeTest/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/ABAcalls1_d0g0v0.json', 'ABAcalls1_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stCallCreateCallCodeTest/CallRecursiveBombPreCall_d0g0v0.json', 'CallRecursiveBombPreCall_d0g0v0_Frontier'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call1MB1024Calldepth_d1g0v0.json', 'static_Call1MB1024Calldepth_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stDelegatecallTestHomestead/Delegatecall1024OOG_d0g0v0.json', 'Delegatecall1024OOG_d0g0v0_Homestead'), # noqa: E501 + ('GeneralStateTests/stRecursiveCreate/recursiveCreateReturnValue_d0g0v0.json', 'recursiveCreateReturnValue_d0g0v0_Homestead'), # noqa: E501 ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert2_d0g0v0.json', 'LoopCallsDepthThenRevert2_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stSystemOperationsTest/ABAcalls2_d0g0v0.json', 'ABAcalls2_d0g0v0_Homestead'), # noqa: E501 - ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_2_d0g0v0.json', 'static_Call50000bytesContract50_2_d0g0v0_Byzantium'), # noqa: E501 - ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert2_d0g0v0.json', 'LoopCallsDepthThenRevert2_d0g0v0_EIP158'), # noqa: E501 - ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert3_d0g0v0.json', 'LoopCallsDepthThenRevert3_d0g0v0_EIP158'), # noqa: E501 + ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert2_d0g0v0.json', 'LoopCallsDepthThenRevert2_d0g0v0_Constantinople'), # noqa: E501 ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert3_d0g0v0.json', 'LoopCallsDepthThenRevert3_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert3_d0g0v0.json', 'LoopCallsDepthThenRevert3_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stRevertTest/LoopCallsDepthThenRevert3_d0g0v0.json', 'LoopCallsDepthThenRevert3_d0g0v0_EIP158'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024BalanceTooLow2_d1g0v0.json', 'static_Call1024BalanceTooLow2_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2_d0g0v0.json', 'static_Call1024PreCalls2_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2_d0g0v0.json', 'static_Call1024PreCalls2_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2_d1g0v0.json', 'static_Call1024PreCalls2_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls2_d1g0v0.json', 'static_Call1024PreCalls2_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls3_d1g0v0.json', 'static_Call1024PreCalls3_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls3_d1g0v0.json', 'static_Call1024PreCalls3_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls_d1g0v0.json', 'static_Call1024PreCalls_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1024PreCalls_d1g0v0.json', 'static_Call1024PreCalls_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1MB1024Calldepth_d1g0v0.json', 'static_Call1MB1024Calldepth_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call1MB1024Calldepth_d1g0v0.json', 'static_Call1MB1024Calldepth_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_1_d1g0v0.json', 'static_Call50000bytesContract50_1_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_1_d1g0v0.json', 'static_Call50000bytesContract50_1_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_2_d1g0v0.json', 'static_Call50000bytesContract50_2_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000bytesContract50_2_d1g0v0.json', 'static_Call50000bytesContract50_2_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_d0g0v0.json', 'static_Call50000_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_d0g0v0.json', 'static_Call50000_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_d1g0v0.json', 'static_Call50000_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_d1g0v0.json', 'static_Call50000_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_ecrec_d0g0v0.json', 'static_Call50000_ecrec_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_ecrec_d0g0v0.json', 'static_Call50000_ecrec_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_ecrec_d1g0v0.json', 'static_Call50000_ecrec_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_ecrec_d1g0v0.json', 'static_Call50000_ecrec_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_identity2_d0g0v0.json', 'static_Call50000_identity2_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_identity2_d0g0v0.json', 'static_Call50000_identity2_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_identity2_d1g0v0.json', 'static_Call50000_identity2_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_identity2_d1g0v0.json', 'static_Call50000_identity2_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_identity_d0g0v0.json', 'static_Call50000_identity_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_identity_d0g0v0.json', 'static_Call50000_identity_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_identity_d1g0v0.json', 'static_Call50000_identity_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_identity_d1g0v0.json', 'static_Call50000_identity_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_rip160_d0g0v0.json', 'static_Call50000_rip160_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_rip160_d0g0v0.json', 'static_Call50000_rip160_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_rip160_d1g0v0.json', 'static_Call50000_rip160_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_rip160_d1g0v0.json', 'static_Call50000_rip160_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_sha256_d0g0v0.json', 'static_Call50000_sha256_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_sha256_d0g0v0.json', 'static_Call50000_sha256_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_sha256_d1g0v0.json', 'static_Call50000_sha256_d1g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Call50000_sha256_d1g0v0.json', 'static_Call50000_sha256_d1g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert_d0g0v0.json', 'static_LoopCallsThenRevert_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert_d0g0v0.json', 'static_LoopCallsThenRevert_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert_d0g1v0.json', 'static_LoopCallsThenRevert_d0g1v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_LoopCallsThenRevert_d0g1v0.json', 'static_LoopCallsThenRevert_d0g1v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Return50000_2_d0g0v0.json', 'static_Return50000_2_d0g0v0_Byzantium'), # noqa: E501 + ('GeneralStateTests/stStaticCall/static_Return50000_2_d0g0v0.json', 'static_Return50000_2_d0g0v0_Constantinople'), # noqa: E501 + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_Frontier'), # noqa: E501 + ('GeneralStateTests/stSystemOperationsTest/CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0.json', 'CallRecursiveBomb0_OOG_atMaxCallDepth_d0g0v0_Homestead'), # noqa: E501 } @@ -145,6 +163,8 @@ def blockchain_fixture_mark_fn(fixture_path, fixture_name, fixture_fork): if fixture_path.startswith('bcExploitTest'): return pytest.mark.skip("Exploit tests are slow") + elif fixture_path.startswith('bcForkStressTest/ForkStressTest.json'): + return pytest.mark.skip("Fork stress tests are slow.") elif fixture_path == 'bcWalletTest/walletReorganizeOwners.json': return pytest.mark.skip("Wallet owner reorganization tests are slow") elif fixture_id in INCORRECT_UPSTREAM_TESTS: