From 5633d1b311b82c7cb862545fb27b391466b9a8da Mon Sep 17 00:00:00 2001 From: Keri Date: Fri, 20 Sep 2019 16:02:00 -0600 Subject: [PATCH 01/12] Add updated geth 1.9 fixture --- .circleci/config.yml | 48 ++++++++++++++++++ setup.py | 4 +- tests/generate_go_ethereum_fixture.py | 8 +-- .../generate_fixtures/go_ethereum.py | 8 +-- tests/integration/geth-1.9.3-fixture.zip | Bin 0 -> 18784 bytes tests/integration/go_ethereum/common.py | 34 ------------- tests/integration/go_ethereum/conftest.py | 3 ++ .../go_ethereum/test_goethereum_http.py | 1 + .../go_ethereum/test_goethereum_ws.py | 1 + 9 files changed, 63 insertions(+), 44 deletions(-) create mode 100644 tests/integration/geth-1.9.3-fixture.zip diff --git a/.circleci/config.yml b/.circleci/config.yml index 950c4df199..dcf5ed6319 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -230,6 +230,30 @@ jobs: TOXENV: py36-integration-goethereum-ws GETH_VERSION: v1.8.22 + py36-integration-goethereum-ipc-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.6 + environment: + TOXENV: py36-integration-goethereum-ipc + GETH_VERSION: v1.9.3 + + py36-integration-goethereum-http-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.6 + environment: + TOXENV: py36-integration-goethereum-http + GETH_VERSION: v1.9.3 + + py36-integration-goethereum-ws-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.6 + environment: + TOXENV: py36-integration-goethereum-ws + GETH_VERSION: v1.9.3 + py36-integration-parity-ipc: <<: *parity_steps docker: @@ -338,6 +362,30 @@ jobs: TOXENV: py37-integration-goethereum-ws GETH_VERSION: v1.8.22 + py37-integration-goethereum-ipc-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.7 + environment: + TOXENV: py37-integration-goethereum-ipc + GETH_VERSION: v1.9.3 + + py37-integration-goethereum-http-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.7 + environment: + TOXENV: py37-integration-goethereum-http + GETH_VERSION: v1.9.3 + + py37-integration-goethereum-ws-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.7 + environment: + TOXENV: py37-integration-goethereum-ws + GETH_VERSION: v1.9.3 + py37-integration-parity-ipc: <<: *parity_steps docker: diff --git a/setup.py b/setup.py index b01144d669..12cbb198ac 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,8 @@ extras_require = { 'tester': [ - "eth-tester[py-evm]==v0.2.0-beta.2", - "py-geth>=2.0.1,<3.0.0", + "eth-tester[py-evm]==0.1.0-beta.39", + "py-geth @ git+ssh://git@github.com/ethereum/py-geth@ad462e7c841ebd9363b318889252e1f7d7c09c56#egg=py_geth", # noqa: F401 ], 'linter': [ "flake8==3.4.1", diff --git a/tests/generate_go_ethereum_fixture.py b/tests/generate_go_ethereum_fixture.py index 8d307f8038..498074c521 100644 --- a/tests/generate_go_ethereum_fixture.py +++ b/tests/generate_go_ethereum_fixture.py @@ -31,8 +31,8 @@ ) from web3 import Web3 from web3._utils.module_testing.emitter_contract import ( - EMITTER_ABI, - EMITTER_BYTECODE, + CONTRACT_EMITTER_ABI, + CONTRACT_EMITTER_CODE, EMITTER_ENUM, ) from web3._utils.module_testing.math_contract import ( @@ -346,8 +346,8 @@ def setup_chain_state(web3): # Emitter Contract # emitter_contract_factory = web3.eth.contract( - abi=EMITTER_ABI, - bytecode=EMITTER_BYTECODE, + abi=CONTRACT_EMITTER_ABI, + bytecode=CONTRACT_EMITTER_CODE, ) emitter_deploy_receipt = deploy_contract(web3, 'emitter', emitter_contract_factory) emitter_contract = emitter_contract_factory(emitter_deploy_receipt['contractAddress']) diff --git a/tests/integration/generate_fixtures/go_ethereum.py b/tests/integration/generate_fixtures/go_ethereum.py index 9f593ad446..1686174400 100644 --- a/tests/integration/generate_fixtures/go_ethereum.py +++ b/tests/integration/generate_fixtures/go_ethereum.py @@ -19,8 +19,8 @@ ) from web3 import Web3 from web3._utils.module_testing.emitter_contract import ( - EMITTER_ABI, - EMITTER_BYTECODE, + CONTRACT_EMITTER_ABI, + CONTRACT_EMITTER_CODE, EMITTER_ENUM, ) from web3._utils.module_testing.math_contract import ( @@ -91,8 +91,8 @@ def setup_chain_state(web3): # Emitter Contract # emitter_contract_factory = web3.eth.contract( - abi=EMITTER_ABI, - bytecode=EMITTER_BYTECODE, + abi=CONTRACT_EMITTER_ABI, + bytecode=CONTRACT_EMITTER_CODE, ) emitter_deploy_receipt = common.deploy_contract(web3, 'emitter', emitter_contract_factory) emitter_contract = emitter_contract_factory(emitter_deploy_receipt['contractAddress']) diff --git a/tests/integration/geth-1.9.3-fixture.zip b/tests/integration/geth-1.9.3-fixture.zip new file mode 100644 index 0000000000000000000000000000000000000000..36a477f43496991226bbc068a8b58cbcd80aa0c9 GIT binary patch literal 18784 zcmb`v1z46#6E{vuNq2*^bazOXbVzqecXxMpH-bomq==-HbazQNNPj$@mm`Ox@B9B> z-?v=*JaAn*zk6nOcJAHT8Du0t!BBtzty`8!`sXkI`2fHFHZrg?rj_}72*#5kQ1?Sj z4V-Q5ENu+_9tH^n7?vVMDaQy51T+f*1oZqTl7)e-i7m}rTT6>lx!$*5=n$^s7j5BH zOY`DgO;h<`Zi2@s5l@NQY4X7CT&cTu^JPGGHNn308CR!BjGd-Oj@=X>Z6L6J#2A@S znKLh@ud~Le=hmdi(H7z9uy9*nD);eBTgDt*39jQh8jI;RCPEaGp$4VMg%a!0{`Lm6 zfTbenjH_v#B~m#&C##v(shh&!Zaxg(l#kpvbuiGgf9GnJ9dCShDO^5omZ>?@An~PB zsREFpseI)Ccrvkwv?{wO!ZwEwcyb%R!|cJO+JRcFNejsK9L=+~RqarvZ4K%Sbs2{2 zO1QdJ87L1Yx;hNn0D=ueCol*zWKaQObAITA&yWbJS1AM_^M-8HSKD&)v~He@v(0hJ zAU?$W6s9Ch!;+jQ`98K}_#64n{V1}RF_BrP@a-N%BPUP~a{vjnc&}U|pF-t}d*$kb z0s+C?D_76b!qCL%r*6$-dM(uGp9`Mfg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py index 08bdafb57c..a9c32a415f 100644 --- a/tests/integration/go_ethereum/common.py +++ b/tests/integration/go_ethereum/common.py @@ -17,40 +17,6 @@ def _check_web3_clientVersion(self, client_version): class GoEthereumEthModuleTest(EthModuleTest): - @pytest.mark.xfail(reason='Needs ability to efficiently control mining') - def test_eth_replaceTransaction(self, web3, unlocked_account): - super().test_eth_replaceTransaction(web3, unlocked_account) - - def test_eth_replaceTransaction_incorrect_nonce(self, web3, unlocked_account): - super().test_eth_replaceTransaction_incorrect_nonce(web3, unlocked_account) - - def test_eth_replaceTransaction_gas_price_too_low(self, web3, unlocked_account): - super().test_eth_replaceTransaction_gas_price_too_low(web3, unlocked_account) - - @pytest.mark.xfail(reason='Needs ability to efficiently control mining') - def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account): - super().test_eth_replaceTransaction_gas_price_defaulting_minimum(web3, unlocked_account) - - @pytest.mark.xfail(reason='Needs ability to efficiently control mining') - def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self, - web3, - unlocked_account): - super().test_eth_replaceTransaction_gas_price_defaulting_strategy_higher( - web3, unlocked_account - ) - - @pytest.mark.xfail(reason='Needs ability to efficiently control mining') - def test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(self, - web3, - unlocked_account): - super().test_eth_replaceTransaction_gas_price_defaulting_strategy_lower( - web3, unlocked_account - ) - - @pytest.mark.xfail(reason='Needs ability to efficiently control mining') - def test_eth_modifyTransaction(self, web3, unlocked_account): - super().test_eth_modifyTransaction(web3, unlocked_account) - @pytest.mark.xfail(reason='Block identifier has not been implemented in geth') def test_eth_estimateGas_with_block(self, web3, diff --git a/tests/integration/go_ethereum/conftest.py b/tests/integration/go_ethereum/conftest.py index 48d9cc9de1..9be72154ff 100644 --- a/tests/integration/go_ethereum/conftest.py +++ b/tests/integration/go_ethereum/conftest.py @@ -21,6 +21,7 @@ GETH_17_ZIP = 'geth-17-fixture.zip' GETH_1822_ZIP = 'geth-1.8.22-fixture.zip' +GETH_193_ZIP = 'geth-1.9.3-fixture.zip' @pytest.fixture(scope='module') @@ -60,6 +61,8 @@ def geth_zipfile_version(geth_binary): return GETH_17_ZIP elif version.minor == 8: return GETH_1822_ZIP + elif version.minor == 9: + return GETH_193_ZIP assert False, "Unsupported geth version" diff --git a/tests/integration/go_ethereum/test_goethereum_http.py b/tests/integration/go_ethereum/test_goethereum_http.py index 0e71b74d18..9ced8bbfa4 100644 --- a/tests/integration/go_ethereum/test_goethereum_http.py +++ b/tests/integration/go_ethereum/test_goethereum_http.py @@ -41,6 +41,7 @@ def geth_command_arguments(geth_binary, datadir, rpc_port): '--rpcport', rpc_port, '--rpcapi', 'admin,db,eth,net,web3,personal,shh,web3', '--ipcdisable', + '--allow-insecure-unlock', ) diff --git a/tests/integration/go_ethereum/test_goethereum_ws.py b/tests/integration/go_ethereum/test_goethereum_ws.py index 1081879177..606d4666ee 100644 --- a/tests/integration/go_ethereum/test_goethereum_ws.py +++ b/tests/integration/go_ethereum/test_goethereum_ws.py @@ -43,6 +43,7 @@ def geth_command_arguments(geth_binary, datadir, ws_port): '--wsapi', 'admin,db,eth,net,shh,web3,personal,web3', '--wsorigins', '*', '--ipcdisable', + '--allow-insecure-unlock', ) From 2cd266ed9937c662769004c051c014e95b43e359 Mon Sep 17 00:00:00 2001 From: Keri Date: Thu, 21 Nov 2019 15:53:26 -0700 Subject: [PATCH 02/12] Update py-geth version --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 12cbb198ac..b01144d669 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,8 @@ extras_require = { 'tester': [ - "eth-tester[py-evm]==0.1.0-beta.39", - "py-geth @ git+ssh://git@github.com/ethereum/py-geth@ad462e7c841ebd9363b318889252e1f7d7c09c56#egg=py_geth", # noqa: F401 + "eth-tester[py-evm]==v0.2.0-beta.2", + "py-geth>=2.0.1,<3.0.0", ], 'linter': [ "flake8==3.4.1", From b7bcdbde10eb888836379b590862827db463ca99 Mon Sep 17 00:00:00 2001 From: Keri Date: Thu, 21 Nov 2019 16:42:19 -0700 Subject: [PATCH 03/12] Add geth 1.9 to circle workflows - Conditionally add geth flags based on version - Update py-geth to use higher than 2.2 --- .circleci/config.yml | 33 ++++++++++++++++ setup.py | 3 +- tests/integration/go_ethereum/common.py | 39 ++++++++++++++++++- tests/integration/go_ethereum/conftest.py | 16 +++++--- .../go_ethereum/test_goethereum_ws.py | 18 +++++++-- 5 files changed, 97 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dcf5ed6319..9b714c064d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -494,6 +494,30 @@ jobs: TOXENV: py38-integration-goethereum-ws GETH_VERSION: v1.8.22 + py38-integration-goethereum-ipc-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.8 + environment: + TOXENV: py38-integration-goethereum-ipc + GETH_VERSION: v1.9.3 + + py38-integration-goethereum-http-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.8 + environment: + TOXENV: py38-integration-goethereum-http + GETH_VERSION: v1.9.3 + + py38-integration-goethereum-ws-1.9.3: + <<: *geth_steps + docker: + - image: circleci/python:3.8 + environment: + TOXENV: py38-integration-goethereum-ws + GETH_VERSION: v1.9.3 + py38-integration-parity-ipc: <<: *parity_steps docker: @@ -544,6 +568,9 @@ workflows: - py36-integration-goethereum-ipc-1.8.22 - py36-integration-goethereum-http-1.8.22 - py36-integration-goethereum-ws-1.8.22 + - py36-integration-goethereum-ipc-1.9.3 + - py36-integration-goethereum-http-1.9.3 + - py36-integration-goethereum-ws-1.9.3 - py36-integration-parity-ipc - py36-integration-parity-http - py36-integration-parity-ws @@ -557,6 +584,9 @@ workflows: - py37-integration-goethereum-ipc-1.8.22 - py37-integration-goethereum-http-1.8.22 - py37-integration-goethereum-ws-1.8.22 + - py37-integration-goethereum-ipc-1.9.3 + - py37-integration-goethereum-http-1.9.3 + - py37-integration-goethereum-ws-1.9.3 - py37-integration-parity-ipc - py37-integration-parity-http - py37-integration-parity-ws @@ -570,6 +600,9 @@ workflows: - py38-integration-goethereum-ipc-1.8.22 - py38-integration-goethereum-http-1.8.22 - py38-integration-goethereum-ws-1.8.22 + - py38-integration-goethereum-ipc-1.9.3 + - py38-integration-goethereum-http-1.9.3 + - py38-integration-goethereum-ws-1.9.3 - py38-integration-parity-ipc - py38-integration-parity-http - py38-integration-parity-ws diff --git a/setup.py b/setup.py index b01144d669..9664d3ef57 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,6 @@ extras_require = { 'tester': [ "eth-tester[py-evm]==v0.2.0-beta.2", - "py-geth>=2.0.1,<3.0.0", ], 'linter': [ "flake8==3.4.1", @@ -21,7 +20,7 @@ "click>=5.1", "configparser==3.5.0", "contextlib2>=0.5.4", - "py-geth>=1.4.0", + "py-geth>=2.2.0,<3", "py-solc>=0.4.0", "pytest>=4.4.0,<5.0.0", "sphinx", diff --git a/tests/integration/go_ethereum/common.py b/tests/integration/go_ethereum/common.py index a9c32a415f..e34435790b 100644 --- a/tests/integration/go_ethereum/common.py +++ b/tests/integration/go_ethereum/common.py @@ -11,12 +11,49 @@ ) +OLDER_GETH_VERSIONS = ['v1.7.2', 'v1.8.22'] +NEWER_GETH_VERSIONS = ['v1.8.22', 'v1.9.3'] + + class GoEthereumTest(Web3ModuleTest): def _check_web3_clientVersion(self, client_version): assert client_version.startswith('Geth/') class GoEthereumEthModuleTest(EthModuleTest): + def test_eth_replaceTransaction(self, web3, unlocked_account): + if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + pytest.xfail(reason='Needs ability to efficiently control mining') + super().test_eth_replaceTransaction(web3, unlocked_account) + + def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account): + if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + pytest.xfail(reason='Needs ability to efficiently control mining') + super().test_eth_replaceTransaction_gas_price_defaulting_minimum(web3, unlocked_account) + + def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self, + web3, + unlocked_account): + if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + pytest.xfail(reason='Needs ability to efficiently control mining') + super().test_eth_replaceTransaction_gas_price_defaulting_strategy_higher( + web3, unlocked_account + ) + + def test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(self, + web3, + unlocked_account): + if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + pytest.xfail(reason='Needs ability to efficiently control mining') + super().test_eth_replaceTransaction_gas_price_defaulting_strategy_lower( + web3, unlocked_account + ) + + def test_eth_modifyTransaction(self, web3, unlocked_account): + if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + pytest.xfail(reason='Needs ability to efficiently control mining') + super().test_eth_modifyTransaction(web3, unlocked_account) + @pytest.mark.xfail(reason='Block identifier has not been implemented in geth') def test_eth_estimateGas_with_block(self, web3, @@ -26,7 +63,7 @@ def test_eth_estimateGas_with_block(self, ) def test_eth_submitHashrate(self, web3): - if 'v1.8.22' in web3.clientVersion: + if any([v in web3.clientVersion for v in NEWER_GETH_VERSIONS]): # https://github.com/ethereum/go-ethereum/commit/51db5975cc5fb88db6a0dba1826b534fd4df29d7 pytest.xfail('eth_submitHashrate deprecated in 1.8.22 for ethash_submitHashRate') super().test_eth_submitHashrate(web3) diff --git a/tests/integration/go_ethereum/conftest.py b/tests/integration/go_ethereum/conftest.py index 9be72154ff..7aada1e526 100644 --- a/tests/integration/go_ethereum/conftest.py +++ b/tests/integration/go_ethereum/conftest.py @@ -53,15 +53,19 @@ def absolute_datadir(directory_name): @pytest.fixture(scope="module") -def geth_zipfile_version(geth_binary): +def geth_version(geth_binary): from geth import get_geth_version - version = get_geth_version(geth_executable=os.path.expanduser(geth_binary)) - if version.major == 1: - if version.minor == 7: + return get_geth_version(geth_executable=os.path.expanduser(geth_binary)) + + +@pytest.fixture(scope="module") +def geth_zipfile_version(geth_version): + if geth_version.major == 1: + if geth_version.minor == 7: return GETH_17_ZIP - elif version.minor == 8: + elif geth_version.minor == 8: return GETH_1822_ZIP - elif version.minor == 9: + elif geth_version.minor == 9: return GETH_193_ZIP assert False, "Unsupported geth version" diff --git a/tests/integration/go_ethereum/test_goethereum_ws.py b/tests/integration/go_ethereum/test_goethereum_ws.py index 606d4666ee..d5baacee12 100644 --- a/tests/integration/go_ethereum/test_goethereum_ws.py +++ b/tests/integration/go_ethereum/test_goethereum_ws.py @@ -30,8 +30,7 @@ def endpoint_uri(ws_port): return 'ws://localhost:{0}'.format(ws_port) -@pytest.fixture(scope='module') -def geth_command_arguments(geth_binary, datadir, ws_port): +def base_geth_command_arguments(geth_binary, datadir, ws_port): return ( geth_binary, '--datadir', str(datadir), @@ -43,10 +42,23 @@ def geth_command_arguments(geth_binary, datadir, ws_port): '--wsapi', 'admin,db,eth,net,shh,web3,personal,web3', '--wsorigins', '*', '--ipcdisable', - '--allow-insecure-unlock', ) +@pytest.fixture(scope='module') +def geth_command_arguments(geth_binary, geth_version, datadir, ws_port): + if geth_version.major == 1: + if geth_version.minor == 9: + return ( + base_geth_command_arguments(geth_binary, datadir, ws_port) + + ('--allow-insecure-unlock',) + ) + elif geth_version.minor == 8 or geth_version.minor == 7: + return base_geth_command_arguments(geth_binary, datadir, ws_port) + else: + assert False, "Unsupported geth version" + + @pytest.fixture(scope="module") def web3(geth_process, endpoint_uri, event_loop): event_loop.run_until_complete(wait_for_ws(endpoint_uri, event_loop)) From 0e830806f144d97cada248b1b1c54247db72e3f9 Mon Sep 17 00:00:00 2001 From: Keri Date: Wed, 4 Dec 2019 13:52:16 -0700 Subject: [PATCH 04/12] Refactor out geth base arguments --- tests/integration/go_ethereum/conftest.py | 11 +++++ .../go_ethereum/test_goethereum_http.py | 45 ++++++++++++------ .../go_ethereum/test_goethereum_ipc.py | 18 ++++---- .../go_ethereum/test_goethereum_ws.py | 46 +++++++++++-------- 4 files changed, 80 insertions(+), 40 deletions(-) diff --git a/tests/integration/go_ethereum/conftest.py b/tests/integration/go_ethereum/conftest.py index 7aada1e526..fc1f115527 100644 --- a/tests/integration/go_ethereum/conftest.py +++ b/tests/integration/go_ethereum/conftest.py @@ -58,6 +58,17 @@ def geth_version(geth_binary): return get_geth_version(geth_executable=os.path.expanduser(geth_binary)) +@pytest.fixture(scope="module") +def base_geth_command_arguments(geth_binary, datadir): + return ( + geth_binary, + '--datadir', str(datadir), + '--shh', + '--nodiscover', + '--fakepow', + ) + + @pytest.fixture(scope="module") def geth_zipfile_version(geth_version): if geth_version.major == 1: diff --git a/tests/integration/go_ethereum/test_goethereum_http.py b/tests/integration/go_ethereum/test_goethereum_http.py index 9ced8bbfa4..8bd3f34dd9 100644 --- a/tests/integration/go_ethereum/test_goethereum_http.py +++ b/tests/integration/go_ethereum/test_goethereum_http.py @@ -30,19 +30,38 @@ def endpoint_uri(rpc_port): @pytest.fixture(scope='module') -def geth_command_arguments(geth_binary, datadir, rpc_port): - return ( - geth_binary, - '--datadir', str(datadir), - '--shh', - '--nodiscover', - '--fakepow', - '--rpc', - '--rpcport', rpc_port, - '--rpcapi', 'admin,db,eth,net,web3,personal,shh,web3', - '--ipcdisable', - '--allow-insecure-unlock', - ) +def geth_command_arguments(geth_binary, + datadir, + rpc_port, + base_geth_command_arguments, + geth_version): + + if geth_version.major == 1: + if geth_version.minor == 9: + return ( + base_geth_command_arguments + + ( + '--rpc', + '--rpcport', rpc_port, + '--rpcapi', 'admin,db,eth,net,web3,personal,shh,web3', + '--ipcdisable', + '--allow-insecure-unlock', + ) + ) + elif geth_version.minor == 8 or geth_version.minor == 7: + return ( + base_geth_command_arguments + + ( + '--rpc', + '--rpcport', rpc_port, + '--rpcapi', 'admin,db,eth,net,web3,personal,shh,web3', + '--ipcdisable', + ) + ) + else: + assert False, "Unsupported geth version" + else: + assert False, "Unsupported geth version" @pytest.fixture(scope="module") diff --git a/tests/integration/go_ethereum/test_goethereum_ipc.py b/tests/integration/go_ethereum/test_goethereum_ipc.py index 0baa325e60..9a435a08ae 100644 --- a/tests/integration/go_ethereum/test_goethereum_ipc.py +++ b/tests/integration/go_ethereum/test_goethereum_ipc.py @@ -22,16 +22,18 @@ @pytest.fixture(scope='module') -def geth_command_arguments(geth_binary, datadir, geth_ipc_path): +def geth_command_arguments(geth_binary, + datadir, + geth_ipc_path, + base_geth_command_arguments, + geth_version): geth_port = get_open_port() return ( - geth_binary, - '--datadir', str(datadir), - '--ipcpath', geth_ipc_path, - '--shh', - '--nodiscover', - '--fakepow', - '--port', geth_port, + base_geth_command_arguments + + ( + '--port', geth_port, + '--ipcpath', geth_ipc_path, + ) ) diff --git a/tests/integration/go_ethereum/test_goethereum_ws.py b/tests/integration/go_ethereum/test_goethereum_ws.py index d5baacee12..20182ac0b9 100644 --- a/tests/integration/go_ethereum/test_goethereum_ws.py +++ b/tests/integration/go_ethereum/test_goethereum_ws.py @@ -30,33 +30,41 @@ def endpoint_uri(ws_port): return 'ws://localhost:{0}'.format(ws_port) -def base_geth_command_arguments(geth_binary, datadir, ws_port): - return ( - geth_binary, - '--datadir', str(datadir), - '--nodiscover', - '--fakepow', - '--ws', - '--shh', - '--wsport', ws_port, - '--wsapi', 'admin,db,eth,net,shh,web3,personal,web3', - '--wsorigins', '*', - '--ipcdisable', - ) - - @pytest.fixture(scope='module') -def geth_command_arguments(geth_binary, geth_version, datadir, ws_port): +def geth_command_arguments(geth_binary, + geth_version, + datadir, + ws_port, + base_geth_command_arguments): + if geth_version.major == 1: if geth_version.minor == 9: return ( - base_geth_command_arguments(geth_binary, datadir, ws_port) + - ('--allow-insecure-unlock',) + base_geth_command_arguments + + ( + '--ws', + '--wsport', ws_port, + '--wsapi', 'admin,db,eth,net,shh,web3,personal,web3', + '--wsorigins', '*', + '--ipcdisable', + '--allow-insecure-unlock', + ) ) elif geth_version.minor == 8 or geth_version.minor == 7: - return base_geth_command_arguments(geth_binary, datadir, ws_port) + return ( + base_geth_command_arguments + + ( + '--ws', + '--wsport', ws_port, + '--wsapi', 'admin,db,eth,net,shh,web3,personal,web3', + '--wsorigins', '*', + '--ipcdisable', + ) + ) else: assert False, "Unsupported geth version" + else: + assert False, "Unsupported geth version" @pytest.fixture(scope="module") From 95e8022f3fa07c78aaffe7175ed68d69f04bf4c3 Mon Sep 17 00:00:00 2001 From: Keri Date: Wed, 4 Dec 2019 15:07:17 -0700 Subject: [PATCH 05/12] Update geth fixture to 1.9.7 --- .circleci/config.yml | 54 +++++++++--------- setup.py | 1 + tests/generate_go_ethereum_fixture.py | 1 + tests/integration/geth-1.9.3-fixture.zip | Bin 18784 -> 0 bytes tests/integration/geth-1.9.7-fixture.zip | Bin 0 -> 19096 bytes tests/integration/go_ethereum/common.py | 3 +- tests/integration/go_ethereum/conftest.py | 16 +++--- .../go_ethereum/test_goethereum_http.py | 12 ++-- .../go_ethereum/test_goethereum_ipc.py | 7 +-- .../go_ethereum/test_goethereum_ws.py | 8 +-- web3/_utils/module_testing/eth_module.py | 2 +- 11 files changed, 50 insertions(+), 54 deletions(-) delete mode 100644 tests/integration/geth-1.9.3-fixture.zip create mode 100644 tests/integration/geth-1.9.7-fixture.zip diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b714c064d..1ad044ce84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -230,29 +230,29 @@ jobs: TOXENV: py36-integration-goethereum-ws GETH_VERSION: v1.8.22 - py36-integration-goethereum-ipc-1.9.3: + py36-integration-goethereum-ipc-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.6 environment: TOXENV: py36-integration-goethereum-ipc - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 - py36-integration-goethereum-http-1.9.3: + py36-integration-goethereum-http-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.6 environment: TOXENV: py36-integration-goethereum-http - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 - py36-integration-goethereum-ws-1.9.3: + py36-integration-goethereum-ws-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.6 environment: TOXENV: py36-integration-goethereum-ws - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 py36-integration-parity-ipc: <<: *parity_steps @@ -362,29 +362,29 @@ jobs: TOXENV: py37-integration-goethereum-ws GETH_VERSION: v1.8.22 - py37-integration-goethereum-ipc-1.9.3: + py37-integration-goethereum-ipc-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.7 environment: TOXENV: py37-integration-goethereum-ipc - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 - py37-integration-goethereum-http-1.9.3: + py37-integration-goethereum-http-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.7 environment: TOXENV: py37-integration-goethereum-http - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 - py37-integration-goethereum-ws-1.9.3: + py37-integration-goethereum-ws-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.7 environment: TOXENV: py37-integration-goethereum-ws - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 py37-integration-parity-ipc: <<: *parity_steps @@ -494,29 +494,29 @@ jobs: TOXENV: py38-integration-goethereum-ws GETH_VERSION: v1.8.22 - py38-integration-goethereum-ipc-1.9.3: + py38-integration-goethereum-ipc-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.8 environment: TOXENV: py38-integration-goethereum-ipc - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 - py38-integration-goethereum-http-1.9.3: + py38-integration-goethereum-http-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.8 environment: TOXENV: py38-integration-goethereum-http - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 - py38-integration-goethereum-ws-1.9.3: + py38-integration-goethereum-ws-1.9.7: <<: *geth_steps docker: - image: circleci/python:3.8 environment: TOXENV: py38-integration-goethereum-ws - GETH_VERSION: v1.9.3 + GETH_VERSION: v1.9.7 py38-integration-parity-ipc: <<: *parity_steps @@ -568,9 +568,9 @@ workflows: - py36-integration-goethereum-ipc-1.8.22 - py36-integration-goethereum-http-1.8.22 - py36-integration-goethereum-ws-1.8.22 - - py36-integration-goethereum-ipc-1.9.3 - - py36-integration-goethereum-http-1.9.3 - - py36-integration-goethereum-ws-1.9.3 + - py36-integration-goethereum-ipc-1.9.7 + - py36-integration-goethereum-http-1.9.7 + - py36-integration-goethereum-ws-1.9.7 - py36-integration-parity-ipc - py36-integration-parity-http - py36-integration-parity-ws @@ -584,9 +584,9 @@ workflows: - py37-integration-goethereum-ipc-1.8.22 - py37-integration-goethereum-http-1.8.22 - py37-integration-goethereum-ws-1.8.22 - - py37-integration-goethereum-ipc-1.9.3 - - py37-integration-goethereum-http-1.9.3 - - py37-integration-goethereum-ws-1.9.3 + - py37-integration-goethereum-ipc-1.9.7 + - py37-integration-goethereum-http-1.9.7 + - py37-integration-goethereum-ws-1.9.7 - py37-integration-parity-ipc - py37-integration-parity-http - py37-integration-parity-ws @@ -600,9 +600,9 @@ workflows: - py38-integration-goethereum-ipc-1.8.22 - py38-integration-goethereum-http-1.8.22 - py38-integration-goethereum-ws-1.8.22 - - py38-integration-goethereum-ipc-1.9.3 - - py38-integration-goethereum-http-1.9.3 - - py38-integration-goethereum-ws-1.9.3 + - py38-integration-goethereum-ipc-1.9.7 + - py38-integration-goethereum-http-1.9.7 + - py38-integration-goethereum-ws-1.9.7 - py38-integration-parity-ipc - py38-integration-parity-http - py38-integration-parity-ws diff --git a/setup.py b/setup.py index 9664d3ef57..75aa1caf85 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,7 @@ extras_require = { 'tester': [ "eth-tester[py-evm]==v0.2.0-beta.2", + "py-geth>=2.2.0,<3", ], 'linter': [ "flake8==3.4.1", diff --git a/tests/generate_go_ethereum_fixture.py b/tests/generate_go_ethereum_fixture.py index 498074c521..5beb3ad6a1 100644 --- a/tests/generate_go_ethereum_fixture.py +++ b/tests/generate_go_ethereum_fixture.py @@ -78,6 +78,7 @@ "config": { "chainId": 131277322940537, # the string 'web3py' as an integer "homesteadBlock": 0, + "eip150Block": 0, "eip155Block": 0, "eip158Block": 0 }, diff --git a/tests/integration/geth-1.9.3-fixture.zip b/tests/integration/geth-1.9.3-fixture.zip deleted file mode 100644 index 36a477f43496991226bbc068a8b58cbcd80aa0c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18784 zcmb`v1z46#6E{vuNq2*^bazOXbVzqecXxMpH-bomq==-HbazQNNPj$@mm`Ox@B9B> z-?v=*JaAn*zk6nOcJAHT8Du0t!BBtzty`8!`sXkI`2fHFHZrg?rj_}72*#5kQ1?Sj z4V-Q5ENu+_9tH^n7?vVMDaQy51T+f*1oZqTl7)e-i7m}rTT6>lx!$*5=n$^s7j5BH zOY`DgO;h<`Zi2@s5l@NQY4X7CT&cTu^JPGGHNn308CR!BjGd-Oj@=X>Z6L6J#2A@S znKLh@ud~Le=hmdi(H7z9uy9*nD);eBTgDt*39jQh8jI;RCPEaGp$4VMg%a!0{`Lm6 zfTbenjH_v#B~m#&C##v(shh&!Zaxg(l#kpvbuiGgf9GnJ9dCShDO^5omZ>?@An~PB zsREFpseI)Ccrvkwv?{wO!ZwEwcyb%R!|cJO+JRcFNejsK9L=+~RqarvZ4K%Sbs2{2 zO1QdJ87L1Yx;hNn0D=ueCol*zWKaQObAITA&yWbJS1AM_^M-8HSKD&)v~He@v(0hJ zAU?$W6s9Ch!;+jQ`98K}_#64n{V1}RF_BrP@a-N%BPUP~a{vjnc&}U|pF-t}d*$kb z0s+C?D_76b!qCL%r*6$-dM(uGp9`MfgtTs>WfAkV?>y)A_!324Ot0G|>;}_Cez_mN zi)P|$_5lr@i}B0S;8csGbn1H7+)`!oye5nE+6j}ZTheE>7ZEW~u;7AKO6nUxB_B!E-hC{m!3>asPb>5Kl)$pF3)#Tw_K66@2PIJRb)25vv(W6A zh%p5|icwo%jA|wl+=Mu4Y$r)>ogIB;yE)vQ3r4oi#V{=0iRJnjh}bwY!AMv=katW9 zvE#<1f+T$7W<)hQG^#sz*K8Ur`$&$JVc$^HRR=ojjb46ngUlxk40xyAui`9dnXXzy z6|O(azf1ATrX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gyae8j1mL!hy7z6mo{V+)g}Q;MrGq zo6Pp{6Y~{7-{pHlOfVGZ&6 zdlQgA}#*n#xsq}Za- zbgKjI5Hcc)>bTD#cJ};4@agWpmIoLF1@zB_#`m*!-w=RyUje><9^W35{I2jAFz_!D zzykPt&VP~pz7Y8*)%{1FxA^_1k-@LB3417q~2NY{Qv^;Ow2SUJG?$`7FB70i8`9S97?eakOpF+;ZlnHwRR`J+wS;fqP4Oq<}{eonIKguY3Co17NrQ4;a59L%*uv{%ONc>)?Jd z((rGPpEmKY3H@E|$}gDL_r-lb<@v?S(@6y^=Bl8sI>8->s7=DU>!TiR|0H*TvR^k^%z`rs6VJ`G^kNNpsVEz}@ z;LCsU^Bc2$8mjz7e?$E*`k!j~8Mu7R20)~z(Z^pf)-?Zu`K{&tKK%F#=i|R|9xV6o zm>VFj^O&=z4h0aUdT4pxcYj8F8kc+u`Z(SMh)X`SJa1vze~J6R=6^u{7n6Vx>M${fuk=HzYt@^P%N=r~Vn~Atd-mc>yR7{Qc8@R{jg>U%}g-pn#a?Q&t}< zk??`f`|mvOm-K&B;;#tke}e;T;T~F^x5b~~9wdKij{u+hG!ps?u=)Y;$<_%V>R)lu z$IJn+o`xcSVRt|KN}TXN9LH m!e3yu_h5gY75<-|4`n34@3&h(Ks5J1EBF7x#E1*<*Z%>k5)V88 diff --git a/tests/integration/geth-1.9.7-fixture.zip b/tests/integration/geth-1.9.7-fixture.zip new file mode 100644 index 0000000000000000000000000000000000000000..3ad96721152a703a6928c33d6ece9f92b3047565 GIT binary patch literal 19096 zcmb`v1zeU(6E{qEmvl&XcXxM4Nq48D!cCV-H`3h*(%mhBARyh{T_1QJ)WbPG&-;Gg zH~y9zf9(8sc6N5I-MMCN1!+()G@u76G4hxH@ymaHfZutqqNo*&yyEXJqAU+|bmkv`Q0! zAYnyC+SBcKP`cCl`+|*3K|#2}z)mU(Z`romPUc*|R9?M?!;bRB!=^lo<*g@l71GDu ztrTuGt5-e4qz`CWGjRojG(rIu98>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ld@uarGp8#lcdzS1!y62Kmx0$4YxcC)Jp4CDwPLK?`(uh?j#xyT zEgki4A3C|8U-d-3R1Hvn3#7-Qk}=}#dF+9xXdp-w+{#$YKFV4JsL;I~%`4{6qOHm)LwSUorq+R!Q&QETo|Bd-CeLb*0 zFdscKKiTL14dJ1#^)GrrAiaNd{22bR%Jp$k{!-OL$H!X8Um6Ai$^yteGCn-uevS7R z+taGo{|pG^4RCp6`%ew*@0<@_?Dqj5s#70n2Qc=?`Lw|GDa6wP*GGsf0Q7w*;J3;C zy8Jwacv`ah3&Qj{4eQt(fZA2#tn7xbYD=#jDj-1kM2Kj!mG zmVaB+r!_&p0BrsV@I#It6+*vs^6&3ne!<96{zHx*FhAbJJcW7sBH|ZJ;C;=~lj;1y z%$~l8_=VB`PmI5r3nRl*d7j4Ne_^4~{6n69G25px%3u6E^#9=hp_U&J%co*IjXVB= zDg7tRzgq5J9`N@N4#^|P{bv^7^q)A7misf>_7KteU9zVR}|M@U^h#Wjp7C?pL z-?9GfiSqkbPdvmC9w`eD_6L+dIP#}~gkL~oe*pRy5B&53`U_-%>)+?}w?_g4%TtB_ zeu8+o4?a>BAd~yw0so6betIMP1-5$+_Vcdr|LgrwK^px2xCI16cmHn*4hSff_u+s4 E4|qVJ8vp Date: Wed, 15 Jan 2020 10:52:07 -0700 Subject: [PATCH 06/12] Start/stop miner for replaceTransaction_already_mined test --- tests/generate_go_ethereum_fixture.py | 2 +- tests/integration/go_ethereum/test_goethereum_http.py | 9 ++++++--- tests/integration/go_ethereum/test_goethereum_ipc.py | 5 ++++- tests/integration/go_ethereum/test_goethereum_ws.py | 9 ++++++--- web3/_utils/module_testing/eth_module.py | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/tests/generate_go_ethereum_fixture.py b/tests/generate_go_ethereum_fixture.py index 5beb3ad6a1..388dbf0d23 100644 --- a/tests/generate_go_ethereum_fixture.py +++ b/tests/generate_go_ethereum_fixture.py @@ -26,7 +26,7 @@ valmap, ) -from tests.utils import ( +from utils import ( get_open_port, ) from web3 import Web3 diff --git a/tests/integration/go_ethereum/test_goethereum_http.py b/tests/integration/go_ethereum/test_goethereum_http.py index fce49c4f88..9136aef492 100644 --- a/tests/integration/go_ethereum/test_goethereum_http.py +++ b/tests/integration/go_ethereum/test_goethereum_http.py @@ -41,7 +41,7 @@ def geth_command_arguments(rpc_port, ( '--rpc', '--rpcport', rpc_port, - '--rpcapi', 'admin,db,eth,net,web3,personal,shh,web3', + '--rpcapi', 'admin,db,eth,net,web3,personal,shh,miner', '--ipcdisable', '--allow-insecure-unlock', ) @@ -52,7 +52,7 @@ def geth_command_arguments(rpc_port, ( '--rpc', '--rpcport', rpc_port, - '--rpcapi', 'admin,db,eth,net,web3,personal,shh,web3', + '--rpcapi', 'admin,db,eth,net,web3,personal,shh,miner', '--ipcdisable', ) ) @@ -92,7 +92,10 @@ def test_admin_stopRPC(web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - pass + def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): + web3.geth.miner.start() + super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) + web3.geth.miner.stop() class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/tests/integration/go_ethereum/test_goethereum_ipc.py b/tests/integration/go_ethereum/test_goethereum_ipc.py index 60e9b5e839..ec7747963d 100644 --- a/tests/integration/go_ethereum/test_goethereum_ipc.py +++ b/tests/integration/go_ethereum/test_goethereum_ipc.py @@ -62,7 +62,10 @@ def test_admin_peers(web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - pass + def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): + web3.geth.miner.start() + super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) + web3.geth.miner.stop() class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/tests/integration/go_ethereum/test_goethereum_ws.py b/tests/integration/go_ethereum/test_goethereum_ws.py index 7353777dbc..00f01dcb1c 100644 --- a/tests/integration/go_ethereum/test_goethereum_ws.py +++ b/tests/integration/go_ethereum/test_goethereum_ws.py @@ -44,7 +44,7 @@ def geth_command_arguments(geth_binary, ( '--ws', '--wsport', ws_port, - '--wsapi', 'admin,db,eth,net,shh,web3,personal,web3', + '--wsapi', 'admin,db,eth,net,shh,web3,personal,miner', '--wsorigins', '*', '--ipcdisable', '--allow-insecure-unlock', @@ -56,7 +56,7 @@ def geth_command_arguments(geth_binary, ( '--ws', '--wsport', ws_port, - '--wsapi', 'admin,db,eth,net,shh,web3,personal,web3', + '--wsapi', 'admin,db,eth,net,shh,web3,personal,miner', '--wsorigins', '*', '--ipcdisable', ) @@ -97,7 +97,10 @@ def test_admin_stopWS(self, web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - pass + def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): + web3.geth.miner.start() + super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) + web3.geth.miner.stop() class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/web3/_utils/module_testing/eth_module.py b/web3/_utils/module_testing/eth_module.py index f906eec393..e8c5b364cb 100644 --- a/web3/_utils/module_testing/eth_module.py +++ b/web3/_utils/module_testing/eth_module.py @@ -463,7 +463,6 @@ def test_eth_replaceTransaction_non_existing_transaction( txn_params ) - # auto mine is enabled for this test def test_eth_replaceTransaction_already_mined( self, web3: "Web3", unlocked_account_dual_type: ChecksumAddress ) -> None: @@ -475,6 +474,7 @@ def test_eth_replaceTransaction_already_mined( 'gasPrice': web3.eth.gasPrice, } txn_hash = web3.eth.sendTransaction(txn_params) + web3.eth.waitForTransactionReceipt(txn_hash) txn_params['gasPrice'] = Wei(web3.eth.gasPrice * 2) with pytest.raises(ValueError, match="Supplied transaction with hash"): From 6e16d4b24bb16ca997340eca8322b51fd073e141 Mon Sep 17 00:00:00 2001 From: Keri Date: Wed, 15 Jan 2020 11:51:23 -0700 Subject: [PATCH 07/12] Add newsfragment --- newsfragments/1521.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/1521.misc.rst diff --git a/newsfragments/1521.misc.rst b/newsfragments/1521.misc.rst new file mode 100644 index 0000000000..86212cdafb --- /dev/null +++ b/newsfragments/1521.misc.rst @@ -0,0 +1 @@ +Upgrade Geth integration testing to support 1.9 From 2c901207ef9e59dae11db5a84e338e5ab622f848 Mon Sep 17 00:00:00 2001 From: Keri Date: Wed, 15 Jan 2020 14:06:23 -0700 Subject: [PATCH 08/12] Try enabling the geth miner for replaceTransaction --- tests/integration/go_ethereum/common.py | 18 +++++++++--------- web3/_utils/module_testing/eth_module.py | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/integration/go_ethereum/common.py b/tests/integration/go_ethereum/common.py index 40566f4cba..f33bd90621 100644 --- a/tests/integration/go_ethereum/common.py +++ b/tests/integration/go_ethereum/common.py @@ -10,8 +10,8 @@ Web3ModuleTest, ) -OLDER_GETH_VERSIONS = ['v1.7.2', 'v1.8.22'] -NEWER_GETH_VERSIONS = ['v1.8.22', 'v1.9.7'] +GETH_VERSIONS_WITHOUT_MINING_CONTROL = ['v1.7.2', 'v1.8.22'] +GETH_VERSIONS_WITHOUT_ETH_SUBMITHASH = ['v1.8.22', 'v1.9.7'] class GoEthereumTest(Web3ModuleTest): @@ -21,19 +21,19 @@ def _check_web3_clientVersion(self, client_version): class GoEthereumEthModuleTest(EthModuleTest): def test_eth_replaceTransaction(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): - pytest.xfail(reason='Needs ability to efficiently control mining') + # if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): + # pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction(web3, unlocked_account) def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction_gas_price_defaulting_minimum(web3, unlocked_account) def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction_gas_price_defaulting_strategy_higher( web3, unlocked_account @@ -42,14 +42,14 @@ def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self, def test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction_gas_price_defaulting_strategy_lower( web3, unlocked_account ) def test_eth_modifyTransaction(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in OLDER_GETH_VERSIONS]): + if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_modifyTransaction(web3, unlocked_account) @@ -62,7 +62,7 @@ def test_eth_estimateGas_with_block(self, ) def test_eth_submitHashrate(self, web3): - if any([v in web3.clientVersion for v in NEWER_GETH_VERSIONS]): + if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_ETH_SUBMITHASH]): # https://github.com/ethereum/go-ethereum/commit/51db5975cc5fb88db6a0dba1826b534fd4df29d7 pytest.xfail('eth_submitHashrate deprecated in 1.8.22 for ethash_submitHashRate') super().test_eth_submitHashrate(web3) diff --git a/web3/_utils/module_testing/eth_module.py b/web3/_utils/module_testing/eth_module.py index e8c5b364cb..8d0c8a4675 100644 --- a/web3/_utils/module_testing/eth_module.py +++ b/web3/_utils/module_testing/eth_module.py @@ -438,8 +438,11 @@ def test_eth_replaceTransaction( txn_hash = web3.eth.sendTransaction(txn_params) txn_params['gasPrice'] = Wei(web3.eth.gasPrice * 2) + web3.geth.miner.start() replace_txn_hash = web3.eth.replaceTransaction(txn_hash, txn_params) + web3.eth.waitForTransactionReceipt(replace_txn_hash) replace_txn = web3.eth.getTransaction(replace_txn_hash) + web3.geth.miner.stop() assert is_same_address(replace_txn['from'], cast(ChecksumAddress, txn_params['from'])) assert is_same_address(replace_txn['to'], cast(ChecksumAddress, txn_params['to'])) From e0518f036e3514c3ccc5ecef1f024541805cda3f Mon Sep 17 00:00:00 2001 From: Keri Date: Wed, 15 Jan 2020 15:02:49 -0700 Subject: [PATCH 09/12] put things back to the way they were --- tests/integration/go_ethereum/common.py | 4 ++-- web3/_utils/module_testing/eth_module.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/integration/go_ethereum/common.py b/tests/integration/go_ethereum/common.py index f33bd90621..61e1d03f87 100644 --- a/tests/integration/go_ethereum/common.py +++ b/tests/integration/go_ethereum/common.py @@ -21,8 +21,8 @@ def _check_web3_clientVersion(self, client_version): class GoEthereumEthModuleTest(EthModuleTest): def test_eth_replaceTransaction(self, web3, unlocked_account): - # if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): - # pytest.xfail(reason='Needs ability to efficiently control mining') + if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): + pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction(web3, unlocked_account) def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account): diff --git a/web3/_utils/module_testing/eth_module.py b/web3/_utils/module_testing/eth_module.py index 8d0c8a4675..5be1005988 100644 --- a/web3/_utils/module_testing/eth_module.py +++ b/web3/_utils/module_testing/eth_module.py @@ -438,11 +438,9 @@ def test_eth_replaceTransaction( txn_hash = web3.eth.sendTransaction(txn_params) txn_params['gasPrice'] = Wei(web3.eth.gasPrice * 2) - web3.geth.miner.start() replace_txn_hash = web3.eth.replaceTransaction(txn_hash, txn_params) web3.eth.waitForTransactionReceipt(replace_txn_hash) replace_txn = web3.eth.getTransaction(replace_txn_hash) - web3.geth.miner.stop() assert is_same_address(replace_txn['from'], cast(ChecksumAddress, txn_params['from'])) assert is_same_address(replace_txn['to'], cast(ChecksumAddress, txn_params['to'])) From 4df204499ef7933815efe55393ec802432bfcf7d Mon Sep 17 00:00:00 2001 From: Keri Date: Wed, 15 Jan 2020 15:15:35 -0700 Subject: [PATCH 10/12] Use go ethereum common instead of individual http, ws, ipc tests --- tests/integration/go_ethereum/common.py | 5 +++++ tests/integration/go_ethereum/test_goethereum_http.py | 5 +---- tests/integration/go_ethereum/test_goethereum_ipc.py | 5 +---- tests/integration/go_ethereum/test_goethereum_ws.py | 5 +---- web3/_utils/module_testing/eth_module.py | 1 - 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/tests/integration/go_ethereum/common.py b/tests/integration/go_ethereum/common.py index 61e1d03f87..19a2edb9e2 100644 --- a/tests/integration/go_ethereum/common.py +++ b/tests/integration/go_ethereum/common.py @@ -25,6 +25,11 @@ def test_eth_replaceTransaction(self, web3, unlocked_account): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction(web3, unlocked_account) + def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): + web3.geth.miner.start() + super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) + web3.geth.miner.stop() + def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account): if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') diff --git a/tests/integration/go_ethereum/test_goethereum_http.py b/tests/integration/go_ethereum/test_goethereum_http.py index 9136aef492..b49c75c398 100644 --- a/tests/integration/go_ethereum/test_goethereum_http.py +++ b/tests/integration/go_ethereum/test_goethereum_http.py @@ -92,10 +92,7 @@ def test_admin_stopRPC(web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): - web3.geth.miner.start() - super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) - web3.geth.miner.stop() + pass class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/tests/integration/go_ethereum/test_goethereum_ipc.py b/tests/integration/go_ethereum/test_goethereum_ipc.py index ec7747963d..60e9b5e839 100644 --- a/tests/integration/go_ethereum/test_goethereum_ipc.py +++ b/tests/integration/go_ethereum/test_goethereum_ipc.py @@ -62,10 +62,7 @@ def test_admin_peers(web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): - web3.geth.miner.start() - super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) - web3.geth.miner.stop() + pass class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/tests/integration/go_ethereum/test_goethereum_ws.py b/tests/integration/go_ethereum/test_goethereum_ws.py index 00f01dcb1c..62c9681e27 100644 --- a/tests/integration/go_ethereum/test_goethereum_ws.py +++ b/tests/integration/go_ethereum/test_goethereum_ws.py @@ -97,10 +97,7 @@ def test_admin_stopWS(self, web3): class TestGoEthereumEthModuleTest(GoEthereumEthModuleTest): - def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_type): - web3.geth.miner.start() - super().test_eth_replaceTransaction_already_mined(web3, unlocked_account_dual_type) - web3.geth.miner.stop() + pass class TestGoEthereumVersionModuleTest(GoEthereumVersionModuleTest): diff --git a/web3/_utils/module_testing/eth_module.py b/web3/_utils/module_testing/eth_module.py index 5be1005988..e8c5b364cb 100644 --- a/web3/_utils/module_testing/eth_module.py +++ b/web3/_utils/module_testing/eth_module.py @@ -439,7 +439,6 @@ def test_eth_replaceTransaction( txn_params['gasPrice'] = Wei(web3.eth.gasPrice * 2) replace_txn_hash = web3.eth.replaceTransaction(txn_hash, txn_params) - web3.eth.waitForTransactionReceipt(replace_txn_hash) replace_txn = web3.eth.getTransaction(replace_txn_hash) assert is_same_address(replace_txn['from'], cast(ChecksumAddress, txn_params['from'])) From 24ffd5b0e750e81a41506b59b2e0b49e3a77cac3 Mon Sep 17 00:00:00 2001 From: Keri Date: Wed, 15 Jan 2020 15:50:39 -0700 Subject: [PATCH 11/12] Use raise AssertionError instead of assert False --- tests/integration/go_ethereum/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/go_ethereum/conftest.py b/tests/integration/go_ethereum/conftest.py index a10852719a..d6ffdf3103 100644 --- a/tests/integration/go_ethereum/conftest.py +++ b/tests/integration/go_ethereum/conftest.py @@ -78,7 +78,7 @@ def geth_zipfile_version(get_geth_version): return GETH_1822_ZIP elif get_geth_version.minor == 9: return GETH_197_ZIP - assert False, "Unsupported geth version" + raise AssertionError("Unsupported geth version") @pytest.fixture(scope='module') From 6c108bd7f781ef24535f81348ed6e31046424d53 Mon Sep 17 00:00:00 2001 From: Keri Date: Thu, 16 Jan 2020 10:37:12 -0700 Subject: [PATCH 12/12] Use yield instead of long if statement --- tests/integration/go_ethereum/common.py | 16 +++--- .../go_ethereum/test_goethereum_http.py | 50 +++++++++-------- .../go_ethereum/test_goethereum_ipc.py | 22 +++++--- .../go_ethereum/test_goethereum_ws.py | 53 +++++++++---------- web3/_utils/module_testing/eth_module.py | 2 +- 5 files changed, 73 insertions(+), 70 deletions(-) diff --git a/tests/integration/go_ethereum/common.py b/tests/integration/go_ethereum/common.py index 19a2edb9e2..5aae05c3e5 100644 --- a/tests/integration/go_ethereum/common.py +++ b/tests/integration/go_ethereum/common.py @@ -10,8 +10,8 @@ Web3ModuleTest, ) -GETH_VERSIONS_WITHOUT_MINING_CONTROL = ['v1.7.2', 'v1.8.22'] -GETH_VERSIONS_WITHOUT_ETH_SUBMITHASH = ['v1.8.22', 'v1.9.7'] +VERSIONS_WITHOUT_MINING_CONTROL = ['v1.7.2', 'v1.8.22'] +VERSIONS_WITHOUT_ETH_SUBMITHASH = ['v1.8.22', 'v1.9.7'] class GoEthereumTest(Web3ModuleTest): @@ -21,7 +21,7 @@ def _check_web3_clientVersion(self, client_version): class GoEthereumEthModuleTest(EthModuleTest): def test_eth_replaceTransaction(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): + if any([v in web3.clientVersion for v in VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction(web3, unlocked_account) @@ -31,14 +31,14 @@ def test_eth_replaceTransaction_already_mined(self, web3, unlocked_account_dual_ web3.geth.miner.stop() def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): + if any([v in web3.clientVersion for v in VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction_gas_price_defaulting_minimum(web3, unlocked_account) def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): + if any([v in web3.clientVersion for v in VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction_gas_price_defaulting_strategy_higher( web3, unlocked_account @@ -47,14 +47,14 @@ def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self, def test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): + if any([v in web3.clientVersion for v in VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_replaceTransaction_gas_price_defaulting_strategy_lower( web3, unlocked_account ) def test_eth_modifyTransaction(self, web3, unlocked_account): - if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_MINING_CONTROL]): + if any([v in web3.clientVersion for v in VERSIONS_WITHOUT_MINING_CONTROL]): pytest.xfail(reason='Needs ability to efficiently control mining') super().test_eth_modifyTransaction(web3, unlocked_account) @@ -67,7 +67,7 @@ def test_eth_estimateGas_with_block(self, ) def test_eth_submitHashrate(self, web3): - if any([v in web3.clientVersion for v in GETH_VERSIONS_WITHOUT_ETH_SUBMITHASH]): + if any([v in web3.clientVersion for v in VERSIONS_WITHOUT_ETH_SUBMITHASH]): # https://github.com/ethereum/go-ethereum/commit/51db5975cc5fb88db6a0dba1826b534fd4df29d7 pytest.xfail('eth_submitHashrate deprecated in 1.8.22 for ethash_submitHashRate') super().test_eth_submitHashrate(web3) diff --git a/tests/integration/go_ethereum/test_goethereum_http.py b/tests/integration/go_ethereum/test_goethereum_http.py index b49c75c398..762fa48e07 100644 --- a/tests/integration/go_ethereum/test_goethereum_http.py +++ b/tests/integration/go_ethereum/test_goethereum_http.py @@ -29,37 +29,35 @@ def endpoint_uri(rpc_port): return 'http://localhost:{0}'.format(rpc_port) +def _geth_command_arguments(rpc_port, + base_geth_command_arguments, + geth_version): + yield from base_geth_command_arguments + if geth_version.major == 1: + yield from ( + '--rpc', + '--rpcport', rpc_port, + '--rpcapi', 'admin,db,eth,net,web3,personal,shh,miner', + '--ipcdisable', + ) + if geth_version.minor == 9: + yield '--allow-insecure-unlock' + elif geth_version.minor not in [9, 8, 7]: + raise AssertionError("Unsupported Geth version") + else: + raise AssertionError("Unsupported Geth version") + + @pytest.fixture(scope='module') def geth_command_arguments(rpc_port, base_geth_command_arguments, get_geth_version): - if get_geth_version.major == 1: - if get_geth_version.minor == 9: - return ( - base_geth_command_arguments + - ( - '--rpc', - '--rpcport', rpc_port, - '--rpcapi', 'admin,db,eth,net,web3,personal,shh,miner', - '--ipcdisable', - '--allow-insecure-unlock', - ) - ) - elif get_geth_version.minor == 8 or get_geth_version.minor == 7: - return ( - base_geth_command_arguments + - ( - '--rpc', - '--rpcport', rpc_port, - '--rpcapi', 'admin,db,eth,net,web3,personal,shh,miner', - '--ipcdisable', - ) - ) - else: - assert False, "Unsupported geth version" - else: - assert False, "Unsupported geth version" + return _geth_command_arguments( + rpc_port, + base_geth_command_arguments, + get_geth_version + ) @pytest.fixture(scope="module") diff --git a/tests/integration/go_ethereum/test_goethereum_ipc.py b/tests/integration/go_ethereum/test_goethereum_ipc.py index 60e9b5e839..1b65618fce 100644 --- a/tests/integration/go_ethereum/test_goethereum_ipc.py +++ b/tests/integration/go_ethereum/test_goethereum_ipc.py @@ -21,16 +21,24 @@ ) +def _geth_command_arguments(geth_ipc_path, + base_geth_command_arguments): + + geth_port = get_open_port() + yield from base_geth_command_arguments + yield from ( + '--port', geth_port, + '--ipcpath', geth_ipc_path, + ) + + @pytest.fixture(scope='module') def geth_command_arguments(geth_ipc_path, base_geth_command_arguments): - geth_port = get_open_port() - return ( - base_geth_command_arguments + - ( - '--port', geth_port, - '--ipcpath', geth_ipc_path, - ) + + return _geth_command_arguments( + geth_ipc_path, + base_geth_command_arguments ) diff --git a/tests/integration/go_ethereum/test_goethereum_ws.py b/tests/integration/go_ethereum/test_goethereum_ws.py index 62c9681e27..d138330cd7 100644 --- a/tests/integration/go_ethereum/test_goethereum_ws.py +++ b/tests/integration/go_ethereum/test_goethereum_ws.py @@ -30,6 +30,26 @@ def endpoint_uri(ws_port): return 'ws://localhost:{0}'.format(ws_port) +def _geth_command_arguments(ws_port, + base_geth_command_arguments, + geth_version): + yield from base_geth_command_arguments + if geth_version.major == 1: + yield from ( + '--ws', + '--wsport', ws_port, + '--wsapi', 'admin,db,eth,net,shh,web3,personal,miner', + '--wsorigins', '*', + '--ipcdisable', + ) + if geth_version.minor == 9: + yield '--allow-insecure-unlock' + elif geth_version.minor not in [9, 8, 7]: + raise AssertionError("Unsupported Geth version") + else: + raise AssertionError("Unsupported Geth version") + + @pytest.fixture(scope='module') def geth_command_arguments(geth_binary, get_geth_version, @@ -37,34 +57,11 @@ def geth_command_arguments(geth_binary, ws_port, base_geth_command_arguments): - if get_geth_version.major == 1: - if get_geth_version.minor == 9: - return ( - base_geth_command_arguments + - ( - '--ws', - '--wsport', ws_port, - '--wsapi', 'admin,db,eth,net,shh,web3,personal,miner', - '--wsorigins', '*', - '--ipcdisable', - '--allow-insecure-unlock', - ) - ) - elif get_geth_version.minor == 8 or get_geth_version.minor == 7: - return ( - base_geth_command_arguments + - ( - '--ws', - '--wsport', ws_port, - '--wsapi', 'admin,db,eth,net,shh,web3,personal,miner', - '--wsorigins', '*', - '--ipcdisable', - ) - ) - else: - assert False, "Unsupported geth version" - else: - assert False, "Unsupported geth version" + return _geth_command_arguments( + ws_port, + base_geth_command_arguments, + get_geth_version + ) @pytest.fixture(scope="module") diff --git a/web3/_utils/module_testing/eth_module.py b/web3/_utils/module_testing/eth_module.py index e8c5b364cb..fa26c7a938 100644 --- a/web3/_utils/module_testing/eth_module.py +++ b/web3/_utils/module_testing/eth_module.py @@ -356,7 +356,7 @@ def test_eth_signTransaction(self, web3: "Web3", unlocked_account: ChecksumAddre 'nonce': Nonce(0), } result = web3.eth.signTransaction(txn_params) - signatory_account = web3.eth.account.recoverTransaction(result['raw']) + signatory_account = web3.eth.account.recover_transaction(result['raw']) assert unlocked_account == signatory_account assert result['tx']['to'] == txn_params['to'] assert result['tx']['value'] == txn_params['value']