Skip to content

Commit

Permalink
Merge pull request #424 from ethereum/dev
Browse files Browse the repository at this point in the history
Release to Update package versions
  • Loading branch information
CarlBeek authored Nov 26, 2024
2 parents fdab65d + 18418e6 commit 948d3fc
Show file tree
Hide file tree
Showing 29 changed files with 494 additions and 534 deletions.
66 changes: 23 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ tox_common: &tox_common
key: tox-deps4-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}-{{ checksum "Makefile" }}

orbs:
win: circleci/windows@2.2.0 # The Windows orb give you everything you need to start using the Windows executor.
win: circleci/windows@5.0 # The Windows orb give you everything you need to start using the Windows executor.

jobs:
# Job(s) with Linux OS
venv_build:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
working_directory: ~/repo
steps:
- checkout
Expand All @@ -40,7 +40,7 @@ jobs:
- ./venv
venv_pytest:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
working_directory: ~/repo
steps:
- checkout
Expand All @@ -56,7 +56,7 @@ jobs:
path: test-reports/
venv_lint:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
working_directory: ~/repo
steps:
- checkout
Expand All @@ -65,40 +65,25 @@ jobs:
- run:
name: Run linter with venv
command: make venv_lint
tox-py310-core:
tox-py312-core:
<<: *tox_common
docker:
- image: cimg/python:3.10
- image: cimg/python:3.12
environment:
TOXENV: py310-core
tox-py38-core:
TOXENV: py312-core
tox-py312-script:
<<: *tox_common
docker:
- image: cimg/python:3.8
- image: cimg/python:3.12
environment:
TOXENV: py38-core
tox-py310-script:
<<: *tox_common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-script
tox-py38-script:
<<: *tox_common
docker:
- image: cimg/python:3.8
environment:
TOXENV: py38-script
TOXENV: py312-script
# Job(s) with Windows OS
win-py310-script:
win-py312-script:
executor:
name: win/default
shell: powershell.exe
steps:
- checkout
- run:
name: "Install Python"
command: choco install python --version=3.10.3
- run:
name: Install testing requirements on Windows
command: python -m pip install -r requirements_test.txt
Expand All @@ -110,15 +95,15 @@ jobs:
command: python ./test_btec_script.py
build-linux-amd64:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2204:2024.04.4
working_directory: ~/repo
steps:
- checkout
- run:
name: Install building requirements on Linux
command: |
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f 3.10.2;
pyenv global 3.10.2;
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f 3.12.1;
pyenv global 3.12.1;
pip install -r ./build_configs/linux/requirements.txt;
- run:
name: Build with build.spec
Expand All @@ -127,7 +112,7 @@ jobs:
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
mkdir ${BUILD_FILE_NAME};
pyenv global 3.10.2;
pyenv global 3.12.1;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
- run:
name: Test executable binaries
Expand Down Expand Up @@ -157,16 +142,16 @@ jobs:
path: /tmp/artifacts
build-linux-arm64:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2204:2024.04.4
resource_class: arm.medium
working_directory: ~/repo
steps:
- checkout
- run:
name: Install building requirements on Linux ARM64
command: |
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f 3.10.2;
pyenv global 3.10.2;
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install -f 3.12.1;
pyenv global 3.12.1;
pip install -r ./build_configs/linux/requirements.txt;
- run:
name: Build with build.spec
Expand All @@ -175,7 +160,7 @@ jobs:
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
mkdir ${BUILD_FILE_NAME};
pyenv global 3.10.2;
pyenv global 3.12.1;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
- run:
name: Test executable binaries
Expand Down Expand Up @@ -208,9 +193,6 @@ jobs:
shell: powershell.exe
steps:
- checkout
- run:
name: "Install Python"
command: choco install python --version=3.10.3
- run:
name: Install building requirements on Windows
command: pip install -r ./build_configs/windows/requirements.txt
Expand Down Expand Up @@ -254,7 +236,7 @@ jobs:
path: /tmp/artifacts
build-macos:
macos:
xcode: 13.4.1
xcode: 15.3.0
working_directory: ~/repo
steps:
- run: xcodebuild -version
Expand Down Expand Up @@ -309,11 +291,9 @@ workflows:
- venv_lint:
requires:
- venv_build
- tox-py310-core
- tox-py38-core
- tox-py310-script
- tox-py38-script
- win-py310-script
- tox-py312-core
- tox-py312-script
- win-py312-script
build_linux:
jobs:
- build-linux-amd64
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:alpine3.14
FROM python:alpine3.19

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VENV_NAME?=venv
VENV_ACTIVATE=. $(VENV_NAME)/bin/activate
PYTHON=${VENV_NAME}/bin/python3.8
PYTHON=${VENV_NAME}/bin/python3.12
DOCKER_IMAGE="ethereum/staking-deposit-cli:latest"

help:
Expand All @@ -24,9 +24,9 @@ clean:

$(VENV_NAME)/bin/activate: requirements.txt
@test -d $(VENV_NAME) || python3 -m venv --clear $(VENV_NAME)
${VENV_NAME}/bin/python setup.py install
${VENV_NAME}/bin/python -m pip install -r requirements.txt
${VENV_NAME}/bin/python -m pip install -r requirements_test.txt
${VENV_NAME}/bin/python setup.py install
@touch $(VENV_NAME)/bin/activate

venv_build: $(VENV_NAME)/bin/activate
Expand Down
139 changes: 70 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,69 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Introduction](#introduction)
- [Tutorial for users](#tutorial-for-users)
- [Build requirements](#build-requirements)
- [For Linux or MacOS users](#for-linux-or-macos-users)
- [File Permissions](#file-permissions)
- [Option 1. Download binary executable file](#option-1-download-binary-executable-file)
- [Step 1. Installation](#step-1-installation)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json)
- [`language` Argument](#language-argument)
- [`--non_interactive` flag](#--non_interactive-flag)
- [Commands](#commands)
- [`new-mnemonic` Arguments](#new-mnemonic-arguments)
- [`existing-mnemonic` Arguments](#existing-mnemonic-arguments)
- [Successful message](#successful-message)
- [`generate-bls-to-execution-change` Arguments](#generate-bls-to-execution-change-arguments)
- [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python)
- [Step 0. Python version checking](#step-0-python-version-checking)
- [Step 1. Installation](#step-1-installation-1)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-1)
- [Language Argument](#language-argument)
- [Commands](#commands-1)
- [Arguments](#arguments)
- [Successful message](#successful-message-1)
- [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv)
- [Step 0. Python version checking](#step-0-python-version-checking-1)
- [Step 1. Installation](#step-1-installation-2)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-2)
- [Language Argument](#language-argument-1)
- [Commands](#commands-2)
- [Arguments](#arguments-1)
- [Option 4. Use Docker image](#option-4-use-docker-image)
- [Step 1. Build the docker image](#step-1-build-the-docker-image)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-3)
- [Arguments](#arguments-2)
- [Successful message](#successful-message-2)
- [For Windows users](#for-windows-users)
- [Option 1. Download binary executable file](#option-1-download-binary-executable-file-1)
- [Step 1. Installation](#step-1-installation-3)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-4)
- [Language Argument](#language-argument-2)
- [Commands](#commands-3)
- [Arguments](#arguments-3)
- [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python-1)
- [Step 0. Python version checking](#step-0-python-version-checking-2)
- [Step 1. Installation](#step-1-installation-4)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-5)
- [Language Argument](#language-argument-3)
- [Commands](#commands-4)
- [Arguments](#arguments-4)
- [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv-1)
- [Step 0. Python version checking](#step-0-python-version-checking-3)
- [Step 1. Installation](#step-1-installation-5)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-6)
- [Language Argument](#language-argument-4)
- [Commands](#commands-5)
- [Arguments](#arguments-5)
- [Development](#development)
- [Install basic requirements](#install-basic-requirements)
- [Install testing requirements](#install-testing-requirements)
- [Run tests](#run-tests)
- [Building Binaries](#building-binaries)
- [Mac M1 Binaries](#mac-m1-binaries)
- [staking-deposit-cli](#staking-deposit-cli)
- [Introduction](#introduction)
- [Tutorial for users](#tutorial-for-users)
- [Build requirements](#build-requirements)
- [For Linux or MacOS users](#for-linux-or-macos-users)
- [File Permissions](#file-permissions)
- [Option 1. Download binary executable file](#option-1-download-binary-executable-file)
- [Step 1. Installation](#step-1-installation)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json)
- [`language` Argument](#language-argument)
- [`--non_interactive` flag](#--non_interactive-flag)
- [Commands](#commands)
- [`new-mnemonic` Arguments](#new-mnemonic-arguments)
- [`existing-mnemonic` Arguments](#existing-mnemonic-arguments)
- [Successful message](#successful-message)
- [`generate-bls-to-execution-change` Arguments](#generate-bls-to-execution-change-arguments)
- [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python)
- [Step 0. Python version checking](#step-0-python-version-checking)
- [Step 1. Installation](#step-1-installation-1)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-1)
- [Language Argument](#language-argument-1)
- [Commands](#commands-1)
- [Arguments](#arguments)
- [Successful message](#successful-message-1)
- [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv)
- [Step 0. Python version checking](#step-0-python-version-checking-1)
- [Step 1. Installation](#step-1-installation-2)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-2)
- [Language Argument](#language-argument-2)
- [Commands](#commands-2)
- [Arguments](#arguments-1)
- [Option 4. Use Docker image](#option-4-use-docker-image)
- [Step 1. Build the docker image](#step-1-build-the-docker-image)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-3)
- [Arguments](#arguments-2)
- [Successful message](#successful-message-2)
- [For Windows users](#for-windows-users)
- [Option 1. Download binary executable file](#option-1-download-binary-executable-file-1)
- [Step 1. Installation](#step-1-installation-3)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-4)
- [Language Argument](#language-argument-3)
- [Commands](#commands-3)
- [Arguments](#arguments-3)
- [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python-1)
- [Step 0. Python version checking](#step-0-python-version-checking-2)
- [Step 1. Installation](#step-1-installation-4)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-5)
- [Language Argument](#language-argument-4)
- [Commands](#commands-4)
- [Arguments](#arguments-4)
- [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv-1)
- [Step 0. Python version checking](#step-0-python-version-checking-3)
- [Step 1. Installation](#step-1-installation-5)
- [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-6)
- [Language Argument](#language-argument-5)
- [Commands](#commands-5)
- [Arguments](#arguments-5)
- [Development](#development)
- [Install basic requirements](#install-basic-requirements)
- [Install testing requirements](#install-testing-requirements)
- [Run tests](#run-tests)
- [Building Binaries](#building-binaries)
- [Mac M1 Binaries](#mac-m1-binaries)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand All @@ -85,7 +86,7 @@ You can find the audit report by Trail of Bits [here](https://github.com/trailof

### Build requirements

- [Python **3.8+**](https://www.python.org/about/gettingstarted/)
- [Python **3.12+**](https://www.python.org/about/gettingstarted/)
- [pip3](https://pip.pypa.io/en/stable/installing/)

### For Linux or MacOS users
Expand Down Expand Up @@ -198,7 +199,7 @@ You can use `bls-to-execution-change --help` to see all arguments. Note that if

##### Step 0. Python version checking

Ensure you are using Python version >= Python3.8:
Ensure you are using Python version >= Python3.12:

```sh
python3 -V
Expand Down Expand Up @@ -263,7 +264,7 @@ See [here](#successful-message)

##### Step 0. Python version checking

Ensure you are using Python version >= Python3.8:
Ensure you are using Python version >= Python3.12:

```sh
python3 -V
Expand Down Expand Up @@ -348,10 +349,10 @@ You can also run the tool with optional arguments:
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys ethereum/staking-deposit-cli new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --folder=<YOUR_FOLDER_PATH>
```

Example for 1 validator on the [Prater testnet](https://prater.launchpad.ethereum.org/) using english:
Example for 1 validator on the [Holesky testnet](https://holesky.launchpad.ethereum.org/) using english:

```sh
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys ethereum/staking-deposit-cli new-mnemonic --num_validators=1 --mnemonic_language=english --chain=prater
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys ethereum/staking-deposit-cli new-mnemonic --num_validators=1 --mnemonic_language=english --chain=holesky
```

###### Arguments
Expand Down Expand Up @@ -412,7 +413,7 @@ See [here](#generate-bls-to-execution-change-arguments) for `generate-bls-to-exe

##### Step 0. Python version checking

Ensure you are using Python version >= Python3.8 (Assume that you've installed Python 3 as the main Python):
Ensure you are using Python version >= Python12 (Assume that you've installed Python 3 as the main Python):

```sh
python -V
Expand Down Expand Up @@ -475,7 +476,7 @@ See [here](#generate-bls-to-execution-change-arguments) for `generate-bls-to-exe

##### Step 0. Python version checking

Ensure you are using Python version >= Python3.8 (Assume that you've installed Python 3 as the main Python):
Ensure you are using Python version >= Python3.12 (Assume that you've installed Python 3 as the main Python):

```cmd
python -V
Expand Down
Loading

0 comments on commit 948d3fc

Please sign in to comment.