Skip to content
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
56 changes: 13 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
version: 2.1

# heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml
parameters:
# Note: update these defaults when updating the geth integration test fixture
geth_version:
default: "v1.11.5"
type: string
pygeth_version:
default: "3.12.0"
type: string

common: &common
working_directory: ~/repo
Expand Down Expand Up @@ -74,10 +81,10 @@ geth_steps: &geth_steps
name: build geth if missing
command: |
mkdir -p $HOME/.ethash
pip install --user py-geth>=3.11.0
pip install --user py-geth>=<< pipeline.parameters.pygeth_version >>
export GOROOT=/usr/local/go
echo $GETH_VERSION
export GETH_BINARY="$HOME/.py-geth/geth-$GETH_VERSION/bin/geth"
echo << pipeline.parameters.geth_version >>
export GETH_BINARY="$HOME/.py-geth/geth-<< pipeline.parameters.geth_version >>/bin/geth"
if [ ! -e "$GETH_BINARY" ]; then
curl -O https://storage.googleapis.com/golang/go1.20.1.linux-amd64.tar.gz
tar xvf go1.20.1.linux-amd64.tar.gz
Expand All @@ -86,9 +93,9 @@ geth_steps: &geth_steps
sudo ln -s /usr/local/go/bin/go /usr/local/bin/go
sudo apt-get update;
sudo apt-get install -y build-essential;
python -m geth.install $GETH_VERSION;
python -m geth.install << pipeline.parameters.geth_version >>;
fi
sudo ln -s /home/circleci/.py-geth/geth-$GETH_VERSION/bin/geth /usr/local/bin/geth
sudo ln -s /home/circleci/.py-geth/geth-<< pipeline.parameters.geth_version >>/bin/geth /usr/local/bin/geth
geth version
geth makedag 0 $HOME/.ethash
- run:
Expand Down Expand Up @@ -119,7 +126,6 @@ geth_custom_steps: &geth_custom_steps
command: |
mkdir -p $HOME/.ethash
export GOROOT=/usr/local/go
echo $GETH_VERSION
export GETH_BINARY="./custom_geth"
echo 'export GETH_BINARY="./custom_geth"' >> $BASH_ENV
curl -O https://storage.googleapis.com/golang/go1.20.1.linux-amd64.tar.gz
Expand Down Expand Up @@ -247,55 +253,48 @@ jobs:
- image: cimg/python:3.7
environment:
TOXENV: py37-integration-goethereum-ipc
GETH_VERSION: v1.11.2

py37-integration-goethereum-ipc_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-integration-goethereum-ipc_flaky
GETH_VERSION: v1.11.2

py37-integration-goethereum-http:
<<: *geth_steps
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-integration-goethereum-http
GETH_VERSION: v1.11.2

py37-integration-goethereum-http_async:
<<: *geth_steps
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-integration-goethereum-http_async
GETH_VERSION: v1.11.2

py37-integration-goethereum-http_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-integration-goethereum-http_flaky
GETH_VERSION: v1.11.2

py37-integration-goethereum-ws:
<<: *geth_steps
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-integration-goethereum-ws
GETH_VERSION: v1.11.2

py37-integration-goethereum-ws_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.7
environment:
TOXENV: py37-integration-goethereum-ws_flaky
GETH_VERSION: v1.11.2

py37-integration-ethtester-pyevm:
<<: *common
Expand Down Expand Up @@ -351,55 +350,48 @@ jobs:
- image: cimg/python:3.8
environment:
TOXENV: py38-integration-goethereum-ipc
GETH_VERSION: v1.11.2

py38-integration-goethereum-ipc_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-integration-goethereum-ipc_flaky
GETH_VERSION: v1.11.2

py38-integration-goethereum-http:
<<: *geth_steps
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-integration-goethereum-http
GETH_VERSION: v1.11.2

py38-integration-goethereum-http_async:
<<: *geth_steps
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-integration-goethereum-http_async
GETH_VERSION: v1.11.2

py38-integration-goethereum-http_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-integration-goethereum-http_flaky
GETH_VERSION: v1.11.2

py38-integration-goethereum-ws:
<<: *geth_steps
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-integration-goethereum-ws
GETH_VERSION: v1.11.2

py38-integration-goethereum-ws_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-integration-goethereum-ws_flaky
GETH_VERSION: v1.11.2

py38-integration-ethtester-pyevm:
<<: *common
Expand Down Expand Up @@ -455,55 +447,48 @@ jobs:
- image: cimg/python:3.9
environment:
TOXENV: py39-integration-goethereum-ipc
GETH_VERSION: v1.11.2

py39-integration-goethereum-ipc_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-integration-goethereum-ipc_flaky
GETH_VERSION: v1.11.2

py39-integration-goethereum-http:
<<: *geth_steps
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-integration-goethereum-http
GETH_VERSION: v1.11.2

py39-integration-goethereum-http_async:
<<: *geth_steps
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-integration-goethereum-http_async
GETH_VERSION: v1.11.2

py39-integration-goethereum-http_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-integration-goethereum-http_flaky
GETH_VERSION: v1.11.2

py39-integration-goethereum-ws:
<<: *geth_steps
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-integration-goethereum-ws
GETH_VERSION: v1.11.2

py39-integration-goethereum-ws_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.9
environment:
TOXENV: py39-integration-goethereum-ws_flaky
GETH_VERSION: v1.11.2

py39-integration-ethtester-pyevm:
<<: *common
Expand Down Expand Up @@ -559,55 +544,48 @@ jobs:
- image: cimg/python:3.10
environment:
TOXENV: py310-integration-goethereum-ipc
GETH_VERSION: v1.11.2

py310-integration-goethereum-ipc_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-integration-goethereum-ipc_flaky
GETH_VERSION: v1.11.2

py310-integration-goethereum-http:
<<: *geth_steps
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-integration-goethereum-http
GETH_VERSION: v1.11.2

py310-integration-goethereum-http_async:
<<: *geth_steps
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-integration-goethereum-http_async
GETH_VERSION: v1.11.2

py310-integration-goethereum-http_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-integration-goethereum-http_flaky
GETH_VERSION: v1.11.2

py310-integration-goethereum-ws:
<<: *geth_steps
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-integration-goethereum-ws
GETH_VERSION: v1.11.2

py310-integration-goethereum-ws_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-integration-goethereum-ws_flaky
GETH_VERSION: v1.11.2

py310-integration-ethtester-pyevm:
<<: *common
Expand Down Expand Up @@ -668,55 +646,48 @@ jobs:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-ipc
GETH_VERSION: v1.11.2

py311-integration-goethereum-ipc_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-ipc_flaky
GETH_VERSION: v1.11.2

py311-integration-goethereum-http:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-http
GETH_VERSION: v1.11.2

py311-integration-goethereum-http_async:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-http_async
GETH_VERSION: v1.11.2

py311-integration-goethereum-http_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-http_flaky
GETH_VERSION: v1.11.2

py311-integration-goethereum-ws:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-ws
GETH_VERSION: v1.11.2

py311-integration-goethereum-ws_flaky:
<<: *geth_steps
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-integration-goethereum-ws_flaky
GETH_VERSION: v1.11.2

py311-integration-ethtester-pyevm:
<<: *common
Expand All @@ -739,7 +710,6 @@ jobs:
- image: cimg/python:3.10
environment:
TOXENV: benchmark
GETH_VERSION: v1.11.2

workflows:
version: 2.1
Expand Down
12 changes: 9 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -373,20 +373,26 @@ Geth Fixtures

.. code:: sh

$ python -m geth.install v1.11.2
$ python -m geth.install v1.11.5

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.11.2/bin/geth python ./tests/integration/generate_fixtures/go_ethereum.py ./tests/integration/geth-1.11.2-fixture
$ GETH_BINARY=~/.py-geth/geth-v1.11.5/bin/geth python ./tests/integration/generate_fixtures/go_ethereum.py ./tests/integration/geth-1.11.5-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.
Update the ``/tests/integration/go_ethereum/conftest.py`` and
``/web3/tools/benchmark/node.py`` files to point to this new fixture. Delete the old
fixture.

4. Run the tests. To ensure that the tests run with the correct Geth version locally,
you may again include the ``GETH_BINARY`` environment variable.

5. Update the ``geth_version`` and ``pygeth_version`` parameter defaults in
``/.circleci/config.yml`` to match the ``go-ethereum`` version used to generate the
test fixture and the ``py-geth`` version that supports installing it.


CI Testing With a Nightly Geth Build
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions newsfragments/2896.internal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update go-ethereum integration test fixture to use the latest version of geth - ``v1.11.5``.
Binary file removed tests/integration/geth-1.11.2-fixture.zip
Binary file not shown.
Binary file added tests/integration/geth-1.11.5-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.11.2-fixture.zip"
GETH_FIXTURE_ZIP = "geth-1.11.5-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.11.2-fixture.zip"
GETH_FIXTURE_ZIP = "geth-1.11.5-fixture.zip"

# use same coinbase value as in `web3.py/tests/integration/generate_fixtures/common.py`
COINBASE = "0xdc544d1aa88ff8bbd2f2aec754b1f1e99e1812fd"
Expand Down