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

Renaming project from staking_deposit to ethstaker_deposit #60

Merged
merged 2 commits into from
Jun 7, 2024
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
26 changes: 13 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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/[email protected] # The Windows orb give you everything you need to start using the Windows executor.
win: circleci/[email protected] # The Windows orb give you everything you need to start using the Windows executor.

jobs:
# Job(s) with Linux OS
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
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 BUILD_FILE_NAME=ethstaker_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
mkdir ${BUILD_FILE_NAME};
pyenv global 3.12.1;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
Expand All @@ -122,7 +122,7 @@ jobs:
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 BUILD_FILE_NAME=ethstaker_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}
Expand All @@ -136,7 +136,7 @@ jobs:
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 BUILD_FILE_NAME=ethstaker_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;
Expand All @@ -161,7 +161,7 @@ jobs:
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 BUILD_FILE_NAME=ethstaker_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-arm64;
mkdir ${BUILD_FILE_NAME};
pyenv global 3.12.1;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
Expand All @@ -170,7 +170,7 @@ jobs:
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 BUILD_FILE_NAME=ethstaker_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}
Expand All @@ -183,7 +183,7 @@ jobs:
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;
export BUILD_FILE_NAME=ethstaker_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;
Expand All @@ -207,7 +207,7 @@ jobs:
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 = "ethstaker_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
Expand All @@ -216,7 +216,7 @@ jobs:
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 = "ethstaker_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
Expand All @@ -230,7 +230,7 @@ jobs:
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 = "ethstaker_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
Expand All @@ -256,15 +256,15 @@ jobs:
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 BUILD_FILE_NAME=ethstaker_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 BUILD_FILE_NAME=ethstaker_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}
Expand All @@ -278,7 +278,7 @@ jobs:
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 BUILD_FILE_NAME=ethstaker_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;
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,28 @@ jobs:
- name: Build with build.spec (Linux amd64)
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
export BUILD_FILE_NAME=staking_deposit-cli-${SHORT_SHA}-linux-amd64
export BUILD_FILE_NAME=ethstaker_deposit-cli-${SHORT_SHA}-linux-amd64
echo "BUILD_FILE_NAME=${BUILD_FILE_NAME}" >> "$GITHUB_ENV"
mkdir ${BUILD_FILE_NAME}
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec
- name: Build with build.spec (macOS amd64)
if: ${{ matrix.os == 'macos-12' }}
run: |
export BUILD_FILE_NAME=staking_deposit-cli-${SHORT_SHA}-darwin-amd64
export BUILD_FILE_NAME=ethstaker_deposit-cli-${SHORT_SHA}-darwin-amd64
echo "BUILD_FILE_NAME=${BUILD_FILE_NAME}" >> "$GITHUB_ENV"
mkdir ${BUILD_FILE_NAME}
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/macos/build.spec
- name: Build with build.spec (macOS arm64)
if: ${{ matrix.os == 'macos-latest' }}
run: |
export BUILD_FILE_NAME=staking_deposit-cli-${SHORT_SHA}-darwin-arm64
export BUILD_FILE_NAME=ethstaker_deposit-cli-${SHORT_SHA}-darwin-arm64
echo "BUILD_FILE_NAME=${BUILD_FILE_NAME}" >> "$GITHUB_ENV"
mkdir ${BUILD_FILE_NAME}
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/macos/build.spec
- name: Build with build.spec (Windows amd64)
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
$env:BUILD_FILE_NAME = ("staking_deposit-cli-" + $env:SHORT_SHA + "-windows-amd64")
$env:BUILD_FILE_NAME = ("ethstaker_deposit-cli-" + $env:SHORT_SHA + "-windows-amd64")
echo ("BUILD_FILE_NAME=" + $env:BUILD_FILE_NAME) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
mkdir $env:BUILD_FILE_NAME
$env:BUILD_FILE_NAME_PATH = (".\" + $env:BUILD_FILE_NAME)
Expand Down Expand Up @@ -135,4 +135,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}-${{ github.sha }}-${{ github.run_id }}
path: output\artifacts
path: output\artifacts
4 changes: 2 additions & 2 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
- name: Run tests
run: pytest tests
- name: Run type checker
run: python -m mypy --config-file mypy.ini -p staking_deposit
run: python -m mypy --config-file mypy.ini -p ethstaker_deposit
- name: Run linter
run: flake8 --config=flake8.ini ./staking_deposit ./tests
run: flake8 --config=flake8.ini ./ethstaker_deposit ./tests
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ WORKDIR /app

COPY requirements.txt ./

COPY staking_deposit ./staking_deposit
COPY ethstaker_deposit ./ethstaker_deposit

RUN apk add --update gcc libc-dev linux-headers

RUN pip3 install -r requirements.txt

ARG cli_command

ENTRYPOINT [ "python3", "-m", "staking_deposit" ]
ENTRYPOINT [ "python3", "-m", "ethstaker_deposit" ]

CMD [ $cli_command ]
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VENV_NAME?=venv
VENV_ACTIVATE=. $(VENV_NAME)/bin/activate
PYTHON=${VENV_NAME}/bin/python3.12
DOCKER_IMAGE="ethereum/staking-deposit-cli:latest"
DOCKER_IMAGE="eth-educators/ethstaker-deposit-cli:latest"

help:
@echo "clean - remove build and Python file artifacts"
Expand Down Expand Up @@ -37,10 +37,10 @@ venv_test: venv_build_test
$(VENV_ACTIVATE) && python -m pytest ./tests

venv_lint: venv_build_test
$(VENV_ACTIVATE) && flake8 --config=flake8.ini ./staking_deposit ./tests && mypy --config-file mypy.ini -p staking_deposit
$(VENV_ACTIVATE) && flake8 --config=flake8.ini ./ethstaker_deposit ./tests && mypy --config-file mypy.ini -p ethstaker_deposit

venv_deposit: venv_build
$(VENV_ACTIVATE) && python -m staking_deposit $(filter-out $@,$(MAKECMDGOALS))
$(VENV_ACTIVATE) && python -m ethstaker_deposit $(filter-out $@,$(MAKECMDGOALS))

build_macos: venv_build
${VENV_NAME}/bin/python -m pip install -r ./build_configs/macos/requirements.txt
Expand Down
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# staking-deposit-cli

[![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/ethereum/staking-deposit-cli/badge)](https://www.gitpoap.io/gh/ethereum/staking-deposit-cli)
# ethstaker-deposit-cli

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Expand Down Expand Up @@ -102,7 +100,7 @@ On Unix-based systems, keystores and the `deposit_data*.json` have `440`/`-r--r-

##### Step 1. Installation

See [releases page](https://github.com/ethereum/staking-deposit-cli/releases) to download and decompress the corresponding binary files.
See [releases page](https://github.com/eth-educators/ethstaker-deposit-cli/releases) to download and decompress the corresponding binary files.

##### Step 2. Create keys and `deposit_data-*.json`

Expand Down Expand Up @@ -332,23 +330,23 @@ pip3 install -r requirements.txt
Run one of the following command to enter the interactive CLI:

```sh
python3 -m staking_deposit new-mnemonic
python3 -m ethstaker_deposit new-mnemonic
```

or

```sh
python3 -m staking_deposit existing-mnemonic
python3 -m ethstaker_deposit existing-mnemonic
```

You can also run the tool with optional arguments:

```sh
python3 -m staking_deposit new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
python3 -m ethstaker_deposit new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
```

```sh
python3 -m staking_deposit existing-mnemonic --num_validators=<NUM_VALIDATORS> --validator_start_index=<START_INDEX> --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
python3 -m ethstaker_deposit existing-mnemonic --num_validators=<NUM_VALIDATORS> --validator_start_index=<START_INDEX> --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
```

###### Language Argument
Expand Down Expand Up @@ -382,19 +380,19 @@ make build_docker
Run the following command to enter the interactive CLI:

```sh
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys ethereum/staking-deposit-cli
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys eth-educators/ethstaker-deposit-cli
```

You can also run the tool with optional arguments:

```sh
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>
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys eth-educators/ethstaker-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:

```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 eth-educators/ethstaker-deposit-cli new-mnemonic --num_validators=1 --mnemonic_language=english --chain=prater
```

###### Arguments
Expand All @@ -411,7 +409,7 @@ See [here](#successful-message)

##### Step 1. Installation

See [releases page](https://github.com/ethereum/staking-deposit-cli/releases) to download and decompress the corresponding binary files.
See [releases page](https://github.com/eth-educators/ethstaker-deposit-cli/releases) to download and decompress the corresponding binary files.

##### Step 2. Create keys and `deposit_data-*.json`

Expand Down Expand Up @@ -546,23 +544,23 @@ pip3 install -r requirements.txt
Run one of the following command to enter the interactive CLI:

```cmd
python -m staking_deposit new-mnemonic
python -m ethstaker_deposit new-mnemonic
```

or

```cmd
python -m staking_deposit existing-mnemonic
python -m ethstaker_deposit existing-mnemonic
```

You can also run the tool with optional arguments:

```cmd
python -m staking_deposit new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
python -m ethstaker_deposit new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
```

```cmd
python -m staking_deposit existing-mnemonic --num_validators=<NUM_VALIDATORS> --validator_start_index=<START_INDEX> --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
python -m ethstaker_deposit existing-mnemonic --num_validators=<NUM_VALIDATORS> --validator_start_index=<START_INDEX> --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
```

###### Language Argument
Expand Down Expand Up @@ -604,7 +602,7 @@ python3 -m pytest tests
### Run the app

```sh
python3 -m staking_deposit [OPTIONS] COMMAND [ARGS]
python3 -m ethstaker_deposit [OPTIONS] COMMAND [ARGS]
```

### Building Binaries
Expand Down
6 changes: 3 additions & 3 deletions build_configs/linux/build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
from PyInstaller.utils.hooks import copy_metadata

datas = [
('../../staking_deposit/key_handling/key_derivation/word_lists/*.txt', './staking_deposit/key_handling/key_derivation/word_lists/'),
('../../staking_deposit/intl', './staking_deposit/intl'),
('../../ethstaker_deposit/key_handling/key_derivation/word_lists/*.txt', './ethstaker_deposit/key_handling/key_derivation/word_lists/'),
('../../ethstaker_deposit/intl', './ethstaker_deposit/intl'),
]
datas += copy_metadata('py_ecc')
datas += copy_metadata('ssz')

block_cipher = None


a = Analysis(['../../staking_deposit/deposit.py'],
a = Analysis(['../../ethstaker_deposit/deposit.py'],
binaries=[],
datas=datas,
hiddenimports=[],
Expand Down
6 changes: 3 additions & 3 deletions build_configs/macos/build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
from PyInstaller.utils.hooks import copy_metadata

datas = [
('../../staking_deposit/key_handling/key_derivation/word_lists/*.txt', './staking_deposit/key_handling/key_derivation/word_lists/'),
('../../staking_deposit/intl', './staking_deposit/intl'),
('../../ethstaker_deposit/key_handling/key_derivation/word_lists/*.txt', './ethstaker_deposit/key_handling/key_derivation/word_lists/'),
('../../ethstaker_deposit/intl', './ethstaker_deposit/intl'),
]
datas += copy_metadata('py_ecc')
datas += copy_metadata('ssz')

block_cipher = None


a = Analysis(['../../staking_deposit/deposit.py'],
a = Analysis(['../../ethstaker_deposit/deposit.py'],
binaries=[],
datas=datas,
hiddenimports=[],
Expand Down
6 changes: 3 additions & 3 deletions build_configs/windows/build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
from PyInstaller.utils.hooks import copy_metadata

datas = [
('..\\..\\staking_deposit\\key_handling\\key_derivation\\word_lists\\*.txt', '.\\staking_deposit\\key_handling\\key_derivation\\word_lists'),
('..\\..\\staking_deposit\\intl', '.\\staking_deposit\\intl'),
('..\\..\\ethstaker_deposit\\key_handling\\key_derivation\\word_lists\\*.txt', '.\\ethstaker_deposit\\key_handling\\key_derivation\\word_lists'),
('..\\..\\ethstaker_deposit\\intl', '.\\ethstaker_deposit\\intl'),
]
datas += copy_metadata('py_ecc')
datas += copy_metadata('ssz')

block_cipher = None


a = Analysis(['..\\..\\staking_deposit\\deposit.py'],
a = Analysis(['..\\..\\ethstaker_deposit\\deposit.py'],
binaries=[],
datas=datas,
hiddenimports=[],
Expand Down
Loading