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

General Upgrade and BLS-to-ETH1 fixes #37

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
26c390e
Fix CircleCI tox env
CarlBeek May 15, 2023
9ef2e23
Merge pull request #362 from ethereum/fix_ci-2
CarlBeek May 16, 2023
0dda982
Add Holesky testnet
hwwhww Aug 22, 2023
812cda4
Merge pull request #370 from ethereum/holesky
CarlBeek Aug 24, 2023
4ea123d
Bump version number to 2.6.0 for release
CarlBeek Aug 25, 2023
a3ed31b
Merge pull request #371 from ethereum/v2.6.0
hwwhww Aug 25, 2023
33cdafe
Merge pull request #372 from ethereum/dev
CarlBeek Aug 25, 2023
0594c88
Change to the new Holesky fork version
hwwhww Sep 25, 2023
ab63e8a
Merge pull request #378 from ethereum/new-holesky-fork-version
CarlBeek Sep 25, 2023
313a49e
Bump version numbers
CarlBeek Sep 25, 2023
818e229
Merge pull request #379 from ethereum/v2.7.0
hwwhww Sep 25, 2023
fdab65d
Merge pull request #380 from ethereum/dev
CarlBeek Sep 25, 2023
bed7587
Change lru-dict version
mxmar Nov 2, 2023
5f3976d
Merge remote-tracking branch 'upstream/master' into feat/bls-to-eth1-…
mxmar Nov 2, 2023
b34df53
Upstream master branch merged
mxmar Nov 2, 2023
89501c7
Cli version change
mxmar Nov 2, 2023
fece127
Change default network to LUKSO Mainnet
mxmar Nov 2, 2023
a012f5f
Change default network to LUKSO Mainnet
mxmar Nov 3, 2023
d319463
Change version
mxmar Nov 3, 2023
ddc7be7
Change version
mxmar Nov 3, 2023
d4ebc14
Change version
mxmar Nov 3, 2023
15b22fc
Version variable fixes
mxmar Nov 7, 2023
9d79b80
Added some pytests
mxmar Nov 8, 2023
cc9c4f4
Added some pytests
mxmar Nov 8, 2023
0da7f00
Local bash script execution fixes
mxmar Dec 12, 2023
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
326 changes: 326 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,326 @@
version: 2.1

tox_common: &tox_common
working_directory: ~/repo
steps:
- checkout
- restore_cache:
key: tox-deps4-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}-{{ checksum "Makefile" }}
- run:
name: install dependencies
command: pip install tox
- run:
name: run tox
command: tox
- save_cache:
paths:
- .tox
- ./eggs
key: tox-deps4-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}-{{ checksum "Makefile" }}

orbs:
win: circleci/[email protected] # 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
working_directory: ~/repo
steps:
- checkout
- restore_cache:
key: venv-deps2-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}-{{ checksum "Makefile" }}-v3
- run:
name: Install requirements in venv
command: make venv_build_test
- save_cache:
key: venv-deps2-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}-{{ checksum "Makefile" }}-v3
paths:
- ./venv
venv_pytest:
docker:
- image: cimg/python:3.10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
key: venv-deps2-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}-{{ checksum "Makefile" }}-v3
- run:
name: Run tests with venv
command: make venv_test
- store_artifacts:
path: test-reports/
destination: tr1
- store_test_results:
path: test-reports/
venv_lint:
docker:
- image: cimg/python:3.10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
key: venv-deps2-{{ arch }}-{{ .Branch }}-{{ checksum "requirements.txt" }}-{{ checksum "requirements_test.txt" }}-{{ checksum "setup.py" }}-{{ checksum "Makefile" }}-v3
- run:
name: Run linter with venv
command: make venv_lint
tox-py310-core:
<<: *tox_common
docker:
- image: cimg/python:3.10
environment:
TOXENV: py310-core
tox-py38-core:
<<: *tox_common
docker:
- image: cimg/python:3.8
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
# Job(s) with Windows OS
win-py310-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
- run:
name: Run deposit script on Windows"
command: python ./test_deposit_script.py
- run:
name: Run btec script on Windows"
command: python ./test_btec_script.py
build-linux-amd64:
machine:
image: ubuntu-2004:202201-02
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;
pip install -r ./build_configs/linux/requirements.txt;
- run:
name: Build with build.spec
command: |
export PYTHONHASHSEED=42
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;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
- run:
name: Test executable binaries
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
export TEST_FOLDER_NAME=TMP_TEST_FOLDER
mkdir ${TEST_FOLDER_NAME}
cp -r ${BUILD_FILE_NAME} ${TEST_FOLDER_NAME}
cp test_binary_deposit_script.py ${TEST_FOLDER_NAME}
cp test_binary_btec_script.py ${TEST_FOLDER_NAME}
cd ${TEST_FOLDER_NAME}
python test_binary_deposit_script.py ./${BUILD_FILE_NAME};
python test_binary_btec_script.py ./${BUILD_FILE_NAME};
- run:
name: Compress the file
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
mkdir /tmp/artifacts;
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
sha256sum ${BUILD_FILE_NAME}.tar.gz | head -c 64 > /tmp/artifacts/${BUILD_FILE_NAME}.sha256
- store_artifacts:
path: /tmp/artifacts
build-linux-arm64:
machine:
image: ubuntu-2004:202201-02
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;
pip install -r ./build_configs/linux/requirements.txt;
- run:
name: Build with build.spec
command: |
export PYTHONHASHSEED=42
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;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
- run:
name: Test executable binaries
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
export TEST_FOLDER_NAME=TMP_TEST_FOLDER
mkdir ${TEST_FOLDER_NAME}
cp -r ${BUILD_FILE_NAME} ${TEST_FOLDER_NAME}
cp test_binary_deposit_script.py ${TEST_FOLDER_NAME}
cp test_binary_btec_script.py ${TEST_FOLDER_NAME}
cd ${TEST_FOLDER_NAME}
python test_binary_deposit_script.py ./${BUILD_FILE_NAME};
python test_binary_btec_script.py ./${BUILD_FILE_NAME};
- run:
name: Compress the file
command: |
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
mkdir /tmp/artifacts;
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
sha256sum ${BUILD_FILE_NAME}.tar.gz | head -c 64 > /tmp/artifacts/${BUILD_FILE_NAME}.sha256
- store_artifacts:
path: /tmp/artifacts
build-windows:
executor:
name: win/default
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
- run:
name: Build with build.spec
command: |
$PYTHONHASHSEED = 42
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
$BUILD_FILE_NAME = "staking_deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
mkdir $BUILD_FILE_NAME
$BUILD_FILE_NAME_PATH = ".\" + $BUILD_FILE_NAME
pyinstaller --distpath $BUILD_FILE_NAME_PATH .\build_configs\windows\build.spec
- run:
name: Test executable binaries
command: |
$PYTHONHASHSEED = 42
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
$BUILD_FILE_NAME = "staking_deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
$TEST_FOLDER_NAME = "TMP_TEST_FOLDER"
mkdir ${TEST_FOLDER_NAME}
Copy-item ${BUILD_FILE_NAME} -destination ${TEST_FOLDER_NAME} -recurse
copy test_binary_deposit_script.py ${TEST_FOLDER_NAME}
copy test_binary_btec_script.py ${TEST_FOLDER_NAME}
cd ${TEST_FOLDER_NAME}
python test_binary_deposit_script.py ${BUILD_FILE_NAME}
python test_binary_btec_script.py ${BUILD_FILE_NAME}
- run:
name: Compress the file
command: |
$PYTHONHASHSEED = 42
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
$BUILD_FILE_NAME = "staking_deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
$BUILD_FILE_NAME_PATH = ".\" + $BUILD_FILE_NAME
$ZIP_FILE_NAME = $BUILD_FILE_NAME + ".zip"
Compress-Archive -Path $BUILD_FILE_NAME_PATH -DestinationPath $ZIP_FILE_NAME
mkdir \tmp\artifacts
copy $ZIP_FILE_NAME \tmp\artifacts\
$CHECKSUM_FILE_NAME_PASH = "\tmp\artifacts\" + $BUILD_FILE_NAME + ".sha256"
certUtil -hashfile $ZIP_FILE_NAME SHA256 | findstr /i /v "SHA256" | findstr /i /v "CertUtil" > $CHECKSUM_FILE_NAME_PASH
- store_artifacts:
path: /tmp/artifacts
build-macos:
macos:
xcode: 13.4.1
working_directory: ~/repo
steps:
- run: xcodebuild -version
- run: python3 --version
- checkout
- run:
name: Install building requirements on MacOS
command: pip3 install -r ./build_configs/macos/requirements.txt
- run:
name: Build with build.spec
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
mkdir ${BUILD_FILE_NAME};
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/macos/build.spec;
- run:
name: Test executable binaries
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
export TEST_FOLDER_NAME=TMP_TEST_FOLDER
mkdir ${TEST_FOLDER_NAME}
cp -r ${BUILD_FILE_NAME} ${TEST_FOLDER_NAME}
cp test_binary_deposit_script.py ${TEST_FOLDER_NAME}
cp test_binary_btec_script.py ${TEST_FOLDER_NAME}
cd ${TEST_FOLDER_NAME}
python3 test_binary_deposit_script.py ./${BUILD_FILE_NAME};
python3 test_binary_btec_script.py ./${BUILD_FILE_NAME};
- run:
name: Compress the file
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
tar -zcvf ${BUILD_FILE_NAME}.tar.gz ./${BUILD_FILE_NAME};
mkdir /tmp/artifacts;
cp ${BUILD_FILE_NAME}.tar.gz /tmp/artifacts;
shasum -a 256 ${BUILD_FILE_NAME}.tar.gz | head -c 64 > /tmp/artifacts/${BUILD_FILE_NAME}.sha256
- store_artifacts:
path: /tmp/artifacts

workflows:
version: 2.1
all_test:
jobs:
- venv_build
- venv_pytest:
requires:
- venv_build
- venv_lint:
requires:
- venv_build
- tox-py310-core
- tox-py38-core
- tox-py310-script
- tox-py38-script
- win-py310-script
build_linux:
jobs:
- build-linux-amd64
- build-linux-arm64
build_windows:
jobs:
- build-windows
build_macos:
jobs:
- build-macos
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.5.6"
".": "2.7.0"
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="staking_deposit",
version='2.5.6',
version='2.7.0',
py_modules=["staking_deposit"],
packages=find_packages(exclude=('tests', 'docs')),
python_requires=">=3.8,<4",
Expand Down
4 changes: 2 additions & 2 deletions staking_deposit/cli/generate_bls_to_execution_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
)
from staking_deposit.settings import (
ALL_CHAINS,
MAINNET,
LUKSO,
PRATER,
get_chain_setting,
get_devnet_chain_setting,
Expand Down Expand Up @@ -69,7 +69,7 @@ def get_password(text: str) -> str:
list(ALL_CHAINS.keys())
),
),
default=MAINNET,
default=LUKSO,
help=lambda: load_text(['arg_chain', 'help'], func=FUNC_NAME),
param_decls='--chain',
prompt=choice_prompt_func(
Expand Down
Loading