Skip to content

Commit

Permalink
Merge pull request #215 from ethereum/eth2_rename
Browse files Browse the repository at this point in the history
"Eth2" Removal
Both python script and macOS binary tested manually against deposits on [prater.launchpad.ethereum.org](prater.launchpad.ethereum.org)
  • Loading branch information
CarlBeek authored Sep 10, 2021
2 parents 65de454 + 8022261 commit f8e30fd
Show file tree
Hide file tree
Showing 128 changed files with 178 additions and 178 deletions.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
export BUILD_FILE_NAME=staking_deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
mkdir ${BUILD_FILE_NAME};
pyenv global 3.7.5;
pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/linux/build.spec;
Expand All @@ -128,7 +128,7 @@ jobs:
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
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}
Expand All @@ -140,7 +140,7 @@ jobs:
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-linux-amd64;
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;
Expand All @@ -161,7 +161,7 @@ jobs:
command: |
$PYTHONHASHSEED = 42
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
$BUILD_FILE_NAME = "eth2deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
$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
Expand All @@ -170,7 +170,7 @@ jobs:
command: |
$PYTHONHASHSEED = 42
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
$BUILD_FILE_NAME = "eth2deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
$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
Expand All @@ -182,7 +182,7 @@ jobs:
command: |
$PYTHONHASHSEED = 42
$CIRCLE_SHORT_SHA1 = $env:CIRCLE_SHA1.substring(0,7)
$BUILD_FILE_NAME = "eth2deposit-cli-" + $CIRCLE_SHORT_SHA1 + "-windows-amd64"
$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
Expand All @@ -208,15 +208,15 @@ jobs:
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
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=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
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}
Expand All @@ -228,7 +228,7 @@ jobs:
command: |
export PYTHONHASHSEED=42
export CIRCLE_SHORT_SHA1=$(eval echo $CIRCLE_SHA1 | cut -c -7)
export BUILD_FILE_NAME=eth2deposit-cli-${CIRCLE_SHORT_SHA1}-darwin-amd64;
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;
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /app

COPY requirements.txt setup.py ./

COPY eth2deposit ./eth2deposit
COPY staking_deposit ./staking_deposit

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

Expand All @@ -14,6 +14,6 @@ RUN python3 setup.py install

ARG cli_command

ENTRYPOINT [ "python3", "./eth2deposit/deposit.py" ]
ENTRYPOINT [ "python3", "./staking_deposit/deposit.py" ]

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.8
DOCKER_IMAGE="ethereum/eth2.0-deposit-cli:latest"
DOCKER_IMAGE="ethereum/staking-deposit-cli:latest"

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

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

venv_deposit: venv_build
$(VENV_ACTIVATE) && python ./eth2deposit/deposit.py $(filter-out $@,$(MAKECMDGOALS))
$(VENV_ACTIVATE) && python ./staking_deposit/deposit.py $(filter-out $@,$(MAKECMDGOALS))

build_macos: venv_build
${VENV_NAME}/bin/python -m pip install -r ./build_configs/macos/requirements.txt
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# eth2.0-deposit-cli
# staking-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 @@ -66,7 +66,7 @@

## Introduction

`deposit-cli` is a tool for creating [EIP-2335 format](https://eips.ethereum.org/EIPS/eip-2335) BLS12-381 keystores and a corresponding `deposit_data*.json` file for [Ethereum 2.0 Launchpad](https://github.com/ethereum/eth2.0-deposit).
`deposit-cli` is a tool for creating [EIP-2335 format](https://eips.ethereum.org/EIPS/eip-2335) BLS12-381 keystores and a corresponding `deposit_data*.json` file for [Ethereum 2.0 Launchpad](https://github.com/ethereum/staking-launchpad).

- **Warning: Please generate your keystores on your own safe, completely offline device.**
- **Warning: Please backup your mnemonic, keystores, and password securely.**
Expand All @@ -92,7 +92,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/eth2.0-deposit-cli/releases) to download and decompress the corresponding binary files.
See [releases page](https://github.com/ethereum/staking-deposit-cli/releases) to download and decompress the corresponding binary files.

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

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

```sh
python3 ./eth2deposit/deposit.py new-mnemonic
python3 ./staking_deposit/deposit.py new-mnemonic
```

or

```sh
python3 ./eth2deposit/deposit.py existing-mnemonic
python3 ./staking_deposit/deposit.py existing-mnemonic
```

You can also run the tool with optional arguments:

```sh
python3 ./eth2deposit/deposit.py new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
python3 ./staking_deposit/deposit.py new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
```

```sh
python3 ./eth2deposit/deposit.py existing-mnemonic --num_validators=<NUM_VALIDATORS> --validator_start_index=<START_INDEX> --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
python3 ./staking_deposit/deposit.py existing-mnemonic --num_validators=<NUM_VALIDATORS> --validator_start_index=<START_INDEX> --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
```

###### Language Argument
Expand Down Expand Up @@ -307,19 +307,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/eth2.0-deposit-cli
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys ethereum/staking-deposit-cli
```

You can also run the tool with optional arguments:

```sh
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys ethereum/eth2.0-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 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:

```sh
docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys ethereum/eth2.0-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=prater
```

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

##### Step 1. Installation

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

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

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

```cmd
python .\eth2deposit\deposit.py new-mnemonic
python .\staking_deposit\deposit.py new-mnemonic
```

or

```cmd
python .\eth2deposit\deposit.py existing-mnemonic
python .\staking_deposit\deposit.py existing-mnemonic
```

You can also run the tool with optional arguments:

```cmd
python .\eth2deposit\deposit.py new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
python .\staking_deposit\deposit.py new-mnemonic --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
```

```cmd
python .\eth2deposit\deposit.pyexisting-mnemonic --num_validators=<NUM_VALIDATORS> --validator_start_index=<START_INDEX> --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
python .\staking_deposit\deposit.pyexisting-mnemonic --num_validators=<NUM_VALIDATORS> --validator_start_index=<START_INDEX> --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
```

###### Language Argument
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 @@ -3,11 +3,11 @@
block_cipher = None


a = Analysis(['../../eth2deposit/deposit.py'],
a = Analysis(['../../staking_deposit/deposit.py'],
binaries=[],
datas=[
('../../eth2deposit/key_handling/key_derivation/word_lists/*.txt', './eth2deposit/key_handling/key_derivation/word_lists/'),
('../../eth2deposit/intl', './eth2deposit/intl',)
('../../staking_deposit/key_handling/key_derivation/word_lists/*.txt', './staking_deposit/key_handling/key_derivation/word_lists/'),
('../../staking_deposit/intl', './staking_deposit/intl',)
],
hiddenimports=[],
hookspath=[],
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 @@ -3,11 +3,11 @@
block_cipher = None


a = Analysis(['../../eth2deposit/deposit.py'],
a = Analysis(['../../staking_deposit/deposit.py'],
binaries=None,
datas=[
('../../eth2deposit/key_handling/key_derivation/word_lists/*.txt', './eth2deposit/key_handling/key_derivation/word_lists/'),
('../../eth2deposit/intl', './eth2deposit/intl'),
('../../staking_deposit/key_handling/key_derivation/word_lists/*.txt', './staking_deposit/key_handling/key_derivation/word_lists/'),
('../../staking_deposit/intl', './staking_deposit/intl'),
],
hiddenimports=[],
hookspath=[],
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 @@ -3,11 +3,11 @@
block_cipher = None


a = Analysis(['..\\..\\eth2deposit\\deposit.py'],
a = Analysis(['..\\..\\staking_deposit\\deposit.py'],
binaries=[],
datas=[
('..\\..\\eth2deposit\\key_handling\\key_derivation\\word_lists\\*.txt', '.\\eth2deposit\\key_handling\\key_derivation\\word_lists'),
('..\\..\\eth2deposit\\intl', '.\\eth2deposit\\intl'),
('..\\..\\staking_deposit\\key_handling\\key_derivation\\word_lists\\*.txt', '.\\staking_deposit\\key_handling\\key_derivation\\word_lists'),
('..\\..\\staking_deposit\\intl', '.\\staking_deposit\\intl'),
],
hiddenimports=[],
hookspath=[],
Expand Down
6 changes: 3 additions & 3 deletions deposit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [[ "$OSTYPE" == "linux"* ]] || [[ "$OSTYPE" == "linux-android"* ]] || [[ "$OS
exit 1
fi
echo "Running deposit-cli..."
python3 ./eth2deposit/deposit.py "$@"
python3 ./staking_deposit/deposit.py "$@"

elif [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "cygwin" ]]; then
echo $OSTYPE
Expand All @@ -20,10 +20,10 @@ elif [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "cygwin" ]]; then
exit 1
fi
echo "Running deposit-cli..."
python ./eth2deposit/deposit.py "$@"
python ./staking_deposit/deposit.py "$@"

else
echo "Sorry, to run deposit-cli on" $(uname -s)", please see the trouble-shooting on https://github.com/ethereum/eth2.0-deposit-cli"
echo "Sorry, to run deposit-cli on" $(uname -s)", please see the trouble-shooting on https://github.com/ethereum/staking-deposit-cli"
exit 1

fi
33 changes: 0 additions & 33 deletions eth2deposit/settings.py

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"""

setup(
name="eth2deposit",
name="staking_deposit",
version='1.2.0',
py_modules=["eth2deposit"],
py_modules=["staking_deposit"],
packages=find_packages(exclude=('tests', 'docs')),
python_requires=">=3.7,<4",
)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
Any,
)

from eth2deposit.exceptions import ValidationError
from eth2deposit.key_handling.key_derivation.mnemonic import (
from staking_deposit.exceptions import ValidationError
from staking_deposit.key_handling.key_derivation.mnemonic import (
verify_mnemonic,
)
from eth2deposit.utils.constants import (
from staking_deposit.utils.constants import (
WORD_LISTS_PATH,
)
from eth2deposit.utils.click import (
from staking_deposit.utils.click import (
captive_prompt_callback,
jit_option,
)
from eth2deposit.utils.intl import load_text
from eth2deposit.utils.validation import validate_int_range
from staking_deposit.utils.intl import load_text
from staking_deposit.utils.validation import validate_int_range
from .generate_keys import (
generate_keys,
generate_keys_arguments_decorator,
Expand Down
Loading

0 comments on commit f8e30fd

Please sign in to comment.