Skip to content

Commit

Permalink
[ethereum#1938] - Generate geth fixture for geth version 1.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fselmo committed Jun 8, 2021
1 parent 46953d1 commit 9039949
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 18 deletions.
26 changes: 13 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,23 +219,23 @@ jobs:
- image: circleci/python:3.6
environment:
TOXENV: py36-integration-goethereum-ipc
GETH_VERSION: v1.10.1
GETH_VERSION: v1.10.3

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

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

# py36-integration-parity-ipc:
# <<: *parity_steps
Expand Down Expand Up @@ -311,23 +311,23 @@ jobs:
- image: circleci/python:3.7
environment:
TOXENV: py37-integration-goethereum-ipc
GETH_VERSION: v1.10.1
GETH_VERSION: v1.10.3

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

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

# py37-integration-parity-ipc:
# <<: *parity_steps
Expand Down Expand Up @@ -408,23 +408,23 @@ jobs:
- image: circleci/python:3.8
environment:
TOXENV: py38-integration-goethereum-ipc
GETH_VERSION: v1.10.1
GETH_VERSION: v1.10.3

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

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

# py38-integration-parity-ipc:
# <<: *parity_steps
Expand Down Expand Up @@ -500,23 +500,23 @@ jobs:
- image: circleci/python:3.9
environment:
TOXENV: py39-integration-goethereum-ipc
GETH_VERSION: v1.10.1
GETH_VERSION: v1.10.3

py39-integration-goethereum-http:
<<: *geth_steps
docker:
- image: circleci/python:3.9
environment:
TOXENV: py39-integration-goethereum-http
GETH_VERSION: v1.10.1
GETH_VERSION: v1.10.3

py39-integration-goethereum-ws:
<<: *geth_steps
docker:
- image: circleci/python:3.9
environment:
TOXENV: py39-integration-goethereum-ws
GETH_VERSION: v1.10.1
GETH_VERSION: v1.10.3

# py39-integration-parity-ipc:
# <<: *parity_steps
Expand Down Expand Up @@ -566,7 +566,7 @@ jobs:
- image: circleci/python:3.9
environment:
TOXENV: benchmark
GETH_VERSION: v1.10.1
GETH_VERSION: v1.10.3

workflows:
version: 2.1
Expand Down
13 changes: 10 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ Running the tests

A great way to explore the code base is to run the tests.


First, install the test dependencies:

.. code:: sh
$ pip install -e ".[test]"
You can run all tests with:

.. code:: sh
Expand Down Expand Up @@ -231,19 +238,19 @@ Geth fixtures
this purpose, because it enables you to easily manage multiple versions of Geth.

Note that ``py-geth`` will need updating to support each new Geth version as well.
Add newer Geth version to py-geth is straightforward; see past commits for a template.
Adding newer Geth versions to py-geth is straightforward; see past commits for a template.

If py-geth has the Geth version you need, install that version locally. For example:

.. code:: sh
$ python -m geth.install v1.10.1
$ python -m geth.install v1.10.3
2. Specify the Geth binary and run the fixture creation script (from within the web3.py directory):

.. code:: sh
$ GETH_BINARY=~/.py-geth/geth-v1.10.1/bin/geth python ./tests/integration/generate_fixtures/go_ethereum.py ./tests/integration/geth-1.10.1-fixture
$ GETH_BINARY=~/.py-geth/geth-v1.10.3/bin/geth python ./tests/integration/generate_fixtures/go_ethereum.py ./tests/integration/geth-1.10.3-fixture
3. The output of this script is your fixture, a zip file, which is now stored in ``/tests/integration/``.
Update the ``/tests/integration/go_ethereum/conftest.py`` file to point to this new fixture. Delete the old fixture.
Expand Down
1 change: 1 addition & 0 deletions newsfragments/1938.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Generate Geth test fixture for v1.10.3.
Binary file removed tests/integration/geth-1.10.1-fixture.zip
Binary file not shown.
Binary file added tests/integration/geth-1.10.3-fixture.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/integration/go_ethereum/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

KEYFILE_PW = 'web3py-test'

GETH_FIXTURE_ZIP = 'geth-1.10.1-fixture.zip'
GETH_FIXTURE_ZIP = 'geth-1.10.3-fixture.zip'


@pytest.fixture(scope='module')
Expand Down
2 changes: 1 addition & 1 deletion web3/tools/benchmark/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
kill_proc_gracefully,
)

GETH_FIXTURE_ZIP = "geth-1.10.1-fixture.zip"
GETH_FIXTURE_ZIP = "geth-1.10.3-fixture.zip"


class GethBenchmarkFixture:
Expand Down

0 comments on commit 9039949

Please sign in to comment.