Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old geth versions #1709

Merged
merged 3 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 0 additions & 162 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,54 +188,6 @@ jobs:
# Please don't use this key for any shenanigans
WEB3_INFURA_PROJECT_ID: 7707850c2fb7465ebe6f150d67182e22

py36-integration-goethereum-ipc-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.6
environment:
TOXENV: py36-integration-goethereum-ipc
GETH_VERSION: v1.7.2

py36-integration-goethereum-http-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.6
environment:
TOXENV: py36-integration-goethereum-http
GETH_VERSION: v1.7.2

py36-integration-goethereum-ws-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.6
environment:
TOXENV: py36-integration-goethereum-ws
GETH_VERSION: v1.7.2

py36-integration-goethereum-ipc-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.6
environment:
TOXENV: py36-integration-goethereum-ipc
GETH_VERSION: v1.8.22

py36-integration-goethereum-http-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.6
environment:
TOXENV: py36-integration-goethereum-http
GETH_VERSION: v1.8.22

py36-integration-goethereum-ws-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.6
environment:
TOXENV: py36-integration-goethereum-ws
GETH_VERSION: v1.8.22

py36-integration-goethereum-ipc-1.9.7:
<<: *geth_steps
docker:
Expand Down Expand Up @@ -326,54 +278,6 @@ jobs:
# Please don't use this key for any shenanigans
WEB3_INFURA_PROJECT_ID: 7707850c2fb7465ebe6f150d67182e22

py37-integration-goethereum-ipc-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.7
environment:
TOXENV: py37-integration-goethereum-ipc
GETH_VERSION: v1.7.2

py37-integration-goethereum-http-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.7
environment:
TOXENV: py37-integration-goethereum-http
GETH_VERSION: v1.7.2

py37-integration-goethereum-ws-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.7
environment:
TOXENV: py37-integration-goethereum-ws
GETH_VERSION: v1.7.2

py37-integration-goethereum-ipc-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.7
environment:
TOXENV: py37-integration-goethereum-ipc
GETH_VERSION: v1.8.22

py37-integration-goethereum-http-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.7
environment:
TOXENV: py37-integration-goethereum-http
GETH_VERSION: v1.8.22

py37-integration-goethereum-ws-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.7
environment:
TOXENV: py37-integration-goethereum-ws
GETH_VERSION: v1.8.22

py37-integration-goethereum-ipc-1.9.7:
<<: *geth_steps
docker:
Expand Down Expand Up @@ -464,54 +368,6 @@ jobs:
# Please don't use this key for any shenanigans
WEB3_INFURA_PROJECT_ID: 7707850c2fb7465ebe6f150d67182e22

py38-integration-goethereum-ipc-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.8
environment:
TOXENV: py38-integration-goethereum-ipc
GETH_VERSION: v1.7.2

py38-integration-goethereum-http-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.8
environment:
TOXENV: py38-integration-goethereum-http
GETH_VERSION: v1.7.2

py38-integration-goethereum-ws-1.7.2:
<<: *geth_steps
docker:
- image: circleci/python:3.8
environment:
TOXENV: py38-integration-goethereum-ws
GETH_VERSION: v1.7.2

py38-integration-goethereum-ipc-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.8
environment:
TOXENV: py38-integration-goethereum-ipc
GETH_VERSION: v1.8.22

py38-integration-goethereum-http-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.8
environment:
TOXENV: py38-integration-goethereum-http
GETH_VERSION: v1.8.22

py38-integration-goethereum-ws-1.8.22:
<<: *geth_steps
docker:
- image: circleci/python:3.8
environment:
TOXENV: py38-integration-goethereum-ws
GETH_VERSION: v1.8.22

py38-integration-goethereum-ipc-1.9.7:
<<: *geth_steps
docker:
Expand Down Expand Up @@ -591,12 +447,6 @@ workflows:
- docs
- py36-ens
- py36-ethpm
- py36-integration-goethereum-ipc-1.7.2
- py36-integration-goethereum-http-1.7.2
- py36-integration-goethereum-ws-1.7.2
- 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.7
- py36-integration-goethereum-http-1.9.7
- py36-integration-goethereum-ws-1.9.7
Expand All @@ -607,12 +457,6 @@ workflows:
- py36-wheel-cli
- py37-ens
- py37-ethpm
- py37-integration-goethereum-ipc-1.7.2
- py37-integration-goethereum-http-1.7.2
- py37-integration-goethereum-ws-1.7.2
- 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.7
- py37-integration-goethereum-http-1.9.7
- py37-integration-goethereum-ws-1.9.7
Expand All @@ -623,12 +467,6 @@ workflows:
- py37-wheel-cli
- py38-ens
- py38-ethpm
- py38-integration-goethereum-ipc-1.7.2
- py38-integration-goethereum-http-1.7.2
- py38-integration-goethereum-ws-1.7.2
- 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.7
- py38-integration-goethereum-http-1.9.7
- py38-integration-goethereum-ws-1.9.7
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,6 @@ fabric.properties

# pip wheel metadata
pip-wheel-metadata/

# jupyter notebook files
*.ipynb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

1 change: 1 addition & 0 deletions newsfragments/1709.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove 1.8 and 1.7 Geth tests, since the Geth team only supports the latest version.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"eth-account>=0.5.2,<0.6.0",
"eth-hash[pycryptodome]>=0.2.0,<1.0.0",
"eth-typing>=2.0.0,<3.0.0",
"eth-utils>=1.8.4,<2.0.0",
"eth-utils>=1.8.4,<1.9.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: the revert message work will require a later eth-utils version. Without it, EthereumTesterProvider won't receive revert messages. Can be figured out later.

"hexbytes>=0.1.0,<1.0.0",
"ipfshttpclient>=0.4.13,<1",
"jsonschema>=3.2.0,<4.0.0",
Expand Down
Binary file removed tests/integration/geth-1.8.22-fixture.zip
Binary file not shown.
Binary file removed tests/integration/geth-17-fixture.zip
Binary file not shown.
71 changes: 2 additions & 69 deletions tests/integration/go_ethereum/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
Web3ModuleTest,
)

VERSIONS_WITHOUT_MINING_CONTROL = ['v1.7.2', 'v1.8.22']
VERSIONS_WITHOUT_ETH_SUBMITHASH = ['v1.8.22', 'v1.9.7']
VERSIONS_WITHOUT_ETH_SUBMITHASH = ['v1.9.7']


class GoEthereumTest(Web3ModuleTest):
Expand All @@ -20,44 +19,11 @@ 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 VERSIONS_WITHOUT_MINING_CONTROL]):
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 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 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
)

def test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(self,
web3,
unlocked_account):
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 VERSIONS_WITHOUT_MINING_CONTROL]):
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,
Expand All @@ -72,11 +38,6 @@ def test_eth_submitHashrate(self, web3):
pytest.xfail('eth_submitHashrate deprecated in 1.8.22 for ethash_submitHashRate')
super().test_eth_submitHashrate(web3)

def test_eth_chainId(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('eth_chainId not implemented in geth 1.7.2')
super().test_eth_chainId(web3)

@pytest.mark.xfail(reason='eth_signTypedData has not been released in geth')
def test_eth_signTypedData(self,
web3,
Expand All @@ -103,35 +64,7 @@ class GoEthereumNetModuleTest(NetModuleTest):


class CommonGoEthereumShhModuleTest(GoEthereumShhModuleTest):
def test_shh_sync_filter(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_sync_filter(web3)

def test_shh_sync_filter_deprecated(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_sync_filter_deprecated(web3)

def test_shh_async_filter(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_async_filter(web3)

def test_shh_async_filter_deprecated(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_async_filter_deprecated(web3)

def test_shh_post(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_post(web3)

def test_shh_post_deprecated(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_post_deprecated(web3)
pass


class GoEthereumAdminModuleTest(GoEthereumAdminModuleTest):
Expand Down
11 changes: 2 additions & 9 deletions tests/integration/go_ethereum/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

KEYFILE_PW = 'web3py-test'

GETH_17_ZIP = 'geth-17-fixture.zip'
GETH_1822_ZIP = 'geth-1.8.22-fixture.zip'
GETH_197_ZIP = 'geth-1.9.7-fixture.zip'


Expand Down Expand Up @@ -71,13 +69,8 @@ def base_geth_command_arguments(geth_binary, datadir):

@pytest.fixture(scope="module")
def geth_zipfile_version(get_geth_version):
if get_geth_version.major == 1:
if get_geth_version.minor == 7:
return GETH_17_ZIP
elif get_geth_version.minor == 8:
return GETH_1822_ZIP
elif get_geth_version.minor == 9:
return GETH_197_ZIP
if get_geth_version.major == 1 and get_geth_version.minor == 9:
return GETH_197_ZIP
raise AssertionError("Unsupported geth version")


Expand Down
5 changes: 1 addition & 4 deletions tests/integration/go_ethereum/test_goethereum_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ def _geth_command_arguments(rpc_port,
'--rpcport', rpc_port,
'--rpcapi', 'admin,db,eth,net,web3,personal,shh,miner',
'--ipcdisable',
'--allow-insecure-unlock'
)
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")

Expand Down
5 changes: 2 additions & 3 deletions tests/integration/go_ethereum/test_goethereum_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ def _geth_command_arguments(ws_port,
'--wsapi', 'admin,db,eth,net,shh,web3,personal,miner',
'--wsorigins', '*',
'--ipcdisable',
'--allow-insecure-unlock',
)
if geth_version.minor == 9:
yield '--allow-insecure-unlock'
elif geth_version.minor not in [9, 8, 7]:
if geth_version.minor not in [9]:
raise AssertionError("Unsupported Geth version")
else:
raise AssertionError("Unsupported Geth version")
Expand Down
5 changes: 1 addition & 4 deletions web3/_utils/module_testing/shh_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,7 @@ def test_shh_post_deprecated(self, web3: "Web3") -> None:
#
def test_shh_version(self, web3: "Web3") -> None:
version = web3.geth.shh.version()
if '1.7' in web3.clientVersion:
assert version == '5.0'
else:
assert version == '6.0'
assert version == '6.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - latest version(s) of Geth removed Whisper from the distro, so when we bump to the latest version, maybe we want to look at dropping support for it in Web3.py.


def test_shh_info(self, web3: "Web3") -> None:
pre_info = web3.geth.shh.info()
Expand Down