diff --git a/.circleci/config.yml b/.circleci/config.yml index ad7d5538d..0b383a5a5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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; @@ -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} @@ -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; @@ -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 @@ -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 @@ -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 @@ -208,7 +208,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; mkdir ${BUILD_FILE_NAME}; pyinstaller --distpath ./${BUILD_FILE_NAME} ./build_configs/macos/build.spec; - run: @@ -216,7 +216,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; export TEST_FOLDER_NAME=TMP_TEST_FOLDER mkdir ${TEST_FOLDER_NAME} cp -r ${BUILD_FILE_NAME} ${TEST_FOLDER_NAME} @@ -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; diff --git a/Dockerfile b/Dockerfile index 81e2b2535..73039d740 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 ] diff --git a/Makefile b/Makefile index d17137988..aa118b175 100644 --- a/Makefile +++ b/Makefile @@ -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" @@ -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 diff --git a/README.md b/README.md index 1b2355453..18849a563 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# eth2.0-deposit-cli +# staking-deposit-cli @@ -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.** @@ -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` @@ -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= --mnemonic_language=english --chain= --folder= +python3 ./staking_deposit/deposit.py new-mnemonic --num_validators= --mnemonic_language=english --chain= --folder= ``` ```sh -python3 ./eth2deposit/deposit.py existing-mnemonic --num_validators= --validator_start_index= --chain= --folder= +python3 ./staking_deposit/deposit.py existing-mnemonic --num_validators= --validator_start_index= --chain= --folder= ``` ###### Language Argument @@ -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= --mnemonic_language=english --folder= +docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys ethereum/staking-deposit-cli new-mnemonic --num_validators= --mnemonic_language=english --folder= ``` 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 @@ -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` @@ -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= --mnemonic_language=english --chain= --folder= +python .\staking_deposit\deposit.py new-mnemonic --num_validators= --mnemonic_language=english --chain= --folder= ``` ```cmd -python .\eth2deposit\deposit.pyexisting-mnemonic --num_validators= --validator_start_index= --chain= --folder= +python .\staking_deposit\deposit.pyexisting-mnemonic --num_validators= --validator_start_index= --chain= --folder= ``` ###### Language Argument diff --git a/build_configs/linux/build.spec b/build_configs/linux/build.spec index 824a89605..30ea0574f 100644 --- a/build_configs/linux/build.spec +++ b/build_configs/linux/build.spec @@ -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=[], diff --git a/build_configs/macos/build.spec b/build_configs/macos/build.spec index 1b5e4938a..aad4b18a9 100644 --- a/build_configs/macos/build.spec +++ b/build_configs/macos/build.spec @@ -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=[], diff --git a/build_configs/windows/build.spec b/build_configs/windows/build.spec index 2276beafd..586f0de84 100644 --- a/build_configs/windows/build.spec +++ b/build_configs/windows/build.spec @@ -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=[], diff --git a/deposit.sh b/deposit.sh index 67caba66f..53bc91a38 100755 --- a/deposit.sh +++ b/deposit.sh @@ -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 @@ -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 diff --git a/eth2deposit/settings.py b/eth2deposit/settings.py deleted file mode 100644 index d1c185aef..000000000 --- a/eth2deposit/settings.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import Dict, NamedTuple - - -DEPOSIT_CLI_VERSION = '1.2.0' - - -class BaseChainSetting(NamedTuple): - ETH2_NETWORK_NAME: str - GENESIS_FORK_VERSION: bytes - - -MAINNET = 'mainnet' -PYRMONT = 'pyrmont' -PRATER = 'prater' - - -# Eth2 Mainnet setting -MainnetSetting = BaseChainSetting(ETH2_NETWORK_NAME=MAINNET, GENESIS_FORK_VERSION=bytes.fromhex('00000000')) -# Eth2 pre-launch testnet (spec v1.0.0) -PyrmontSetting = BaseChainSetting(ETH2_NETWORK_NAME=PYRMONT, GENESIS_FORK_VERSION=bytes.fromhex('00002009')) -# Eth2 testnet (spec v1.0.1) -PraterSetting = BaseChainSetting(ETH2_NETWORK_NAME=PRATER, GENESIS_FORK_VERSION=bytes.fromhex('00001020')) - - -ALL_CHAINS: Dict[str, BaseChainSetting] = { - MAINNET: MainnetSetting, - PYRMONT: PyrmontSetting, - PRATER: PraterSetting, -} - - -def get_chain_setting(chain_name: str = MAINNET) -> BaseChainSetting: - return ALL_CHAINS[chain_name] diff --git a/setup.py b/setup.py index 9976c689f..62cc831e3 100644 --- a/setup.py +++ b/setup.py @@ -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", ) diff --git a/eth2deposit/__init__.py b/staking_deposit/__init__.py similarity index 100% rename from eth2deposit/__init__.py rename to staking_deposit/__init__.py diff --git a/eth2deposit/cli/__init__.py b/staking_deposit/cli/__init__.py similarity index 100% rename from eth2deposit/cli/__init__.py rename to staking_deposit/cli/__init__.py diff --git a/eth2deposit/cli/existing_mnemonic.py b/staking_deposit/cli/existing_mnemonic.py similarity index 87% rename from eth2deposit/cli/existing_mnemonic.py rename to staking_deposit/cli/existing_mnemonic.py index f0b2a1ae5..98e8bcd42 100644 --- a/eth2deposit/cli/existing_mnemonic.py +++ b/staking_deposit/cli/existing_mnemonic.py @@ -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, diff --git a/eth2deposit/cli/generate_keys.py b/staking_deposit/cli/generate_keys.py similarity index 93% rename from eth2deposit/cli/generate_keys.py rename to staking_deposit/cli/generate_keys.py index 76a608113..5d8aa5826 100644 --- a/eth2deposit/cli/generate_keys.py +++ b/staking_deposit/cli/generate_keys.py @@ -8,30 +8,30 @@ from eth_typing import HexAddress from eth_utils import is_hex_address, to_normalized_address -from eth2deposit.credentials import ( +from staking_deposit.credentials import ( CredentialList, ) -from eth2deposit.exceptions import ValidationError -from eth2deposit.utils.validation import ( +from staking_deposit.exceptions import ValidationError +from staking_deposit.utils.validation import ( verify_deposit_data_json, validate_int_range, validate_password_strength, ) -from eth2deposit.utils.constants import ( +from staking_deposit.utils.constants import ( MAX_DEPOSIT_AMOUNT, DEFAULT_VALIDATOR_KEYS_FOLDER_NAME, ) -from eth2deposit.utils.ascii_art import RHINO_0 -from eth2deposit.utils.click import ( +from staking_deposit.utils.ascii_art import RHINO_0 +from staking_deposit.utils.click import ( captive_prompt_callback, choice_prompt_func, jit_option, ) -from eth2deposit.utils.intl import ( +from staking_deposit.utils.intl import ( closest_match, load_text, ) -from eth2deposit.settings import ( +from staking_deposit.settings import ( ALL_CHAINS, MAINNET, get_chain_setting, diff --git a/eth2deposit/cli/new_mnemonic.py b/staking_deposit/cli/new_mnemonic.py similarity index 90% rename from eth2deposit/cli/new_mnemonic.py rename to staking_deposit/cli/new_mnemonic.py index 1bf27fbaf..da2e7134e 100644 --- a/eth2deposit/cli/new_mnemonic.py +++ b/staking_deposit/cli/new_mnemonic.py @@ -3,19 +3,19 @@ Any, ) -from eth2deposit.key_handling.key_derivation.mnemonic import ( +from staking_deposit.key_handling.key_derivation.mnemonic import ( get_mnemonic, ) -from eth2deposit.utils.click import ( +from staking_deposit.utils.click import ( captive_prompt_callback, choice_prompt_func, jit_option, ) -from eth2deposit.utils.constants import ( +from staking_deposit.utils.constants import ( MNEMONIC_LANG_OPTIONS, WORD_LISTS_PATH, ) -from eth2deposit.utils.intl import ( +from staking_deposit.utils.intl import ( fuzzy_reverse_dict_lookup, load_text, get_first_options, diff --git a/eth2deposit/credentials.py b/staking_deposit/credentials.py similarity index 94% rename from eth2deposit/credentials.py rename to staking_deposit/credentials.py index c63af766e..80a4ef862 100644 --- a/eth2deposit/credentials.py +++ b/staking_deposit/credentials.py @@ -9,23 +9,23 @@ from eth_utils import to_canonical_address from py_ecc.bls import G2ProofOfPossession as bls -from eth2deposit.exceptions import ValidationError -from eth2deposit.key_handling.key_derivation.path import mnemonic_and_path_to_key -from eth2deposit.key_handling.keystore import ( +from staking_deposit.exceptions import ValidationError +from staking_deposit.key_handling.key_derivation.path import mnemonic_and_path_to_key +from staking_deposit.key_handling.keystore import ( Keystore, ScryptKeystore, ) -from eth2deposit.settings import DEPOSIT_CLI_VERSION, BaseChainSetting -from eth2deposit.utils.constants import ( +from staking_deposit.settings import DEPOSIT_CLI_VERSION, BaseChainSetting +from staking_deposit.utils.constants import ( BLS_WITHDRAWAL_PREFIX, ETH1_ADDRESS_WITHDRAWAL_PREFIX, ETH2GWEI, MAX_DEPOSIT_AMOUNT, MIN_DEPOSIT_AMOUNT, ) -from eth2deposit.utils.crypto import SHA256 -from eth2deposit.utils.intl import load_text -from eth2deposit.utils.ssz import ( +from staking_deposit.utils.crypto import SHA256 +from staking_deposit.utils.intl import load_text +from staking_deposit.utils.ssz import ( compute_deposit_domain, compute_signing_root, DepositData, @@ -139,7 +139,7 @@ def deposit_datum_dict(self) -> Dict[str, bytes]: datum_dict.update({'deposit_message_root': self.deposit_message.hash_tree_root}) datum_dict.update({'deposit_data_root': signed_deposit_datum.hash_tree_root}) datum_dict.update({'fork_version': self.chain_setting.GENESIS_FORK_VERSION}) - datum_dict.update({'eth2_network_name': self.chain_setting.ETH2_NETWORK_NAME}) + datum_dict.update({'network_name': self.chain_setting.NETWORK_NAME}) datum_dict.update({'deposit_cli_version': DEPOSIT_CLI_VERSION}) return datum_dict diff --git a/eth2deposit/deposit.py b/staking_deposit/deposit.py similarity index 81% rename from eth2deposit/deposit.py rename to staking_deposit/deposit.py index 0056075e1..c224bfd2c 100644 --- a/eth2deposit/deposit.py +++ b/staking_deposit/deposit.py @@ -1,16 +1,16 @@ import click import sys -from eth2deposit.cli.existing_mnemonic import existing_mnemonic -from eth2deposit.cli.new_mnemonic import new_mnemonic -from eth2deposit.utils.click import ( +from staking_deposit.cli.existing_mnemonic import existing_mnemonic +from staking_deposit.cli.new_mnemonic import new_mnemonic +from staking_deposit.utils.click import ( captive_prompt_callback, choice_prompt_func, jit_option, ) -from eth2deposit.utils import config -from eth2deposit.utils.constants import INTL_LANG_OPTIONS -from eth2deposit.utils.intl import ( +from staking_deposit.utils import config +from staking_deposit.utils.constants import INTL_LANG_OPTIONS +from staking_deposit.utils.intl import ( get_first_options, fuzzy_reverse_dict_lookup, load_text, diff --git a/eth2deposit/exceptions.py b/staking_deposit/exceptions.py similarity index 100% rename from eth2deposit/exceptions.py rename to staking_deposit/exceptions.py diff --git a/eth2deposit/intl/__init__.py b/staking_deposit/intl/__init__.py similarity index 100% rename from eth2deposit/intl/__init__.py rename to staking_deposit/intl/__init__.py diff --git a/eth2deposit/intl/ar/cli/existing_mnemonic.json b/staking_deposit/intl/ar/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/ar/cli/existing_mnemonic.json rename to staking_deposit/intl/ar/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/ar/cli/generate_keys.json b/staking_deposit/intl/ar/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/ar/cli/generate_keys.json rename to staking_deposit/intl/ar/cli/generate_keys.json diff --git a/eth2deposit/intl/ar/cli/new_mnemonic.json b/staking_deposit/intl/ar/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/ar/cli/new_mnemonic.json rename to staking_deposit/intl/ar/cli/new_mnemonic.json diff --git a/eth2deposit/intl/ar/credentials.json b/staking_deposit/intl/ar/credentials.json similarity index 100% rename from eth2deposit/intl/ar/credentials.json rename to staking_deposit/intl/ar/credentials.json diff --git a/eth2deposit/intl/ar/deposit.json b/staking_deposit/intl/ar/deposit.json similarity index 100% rename from eth2deposit/intl/ar/deposit.json rename to staking_deposit/intl/ar/deposit.json diff --git a/eth2deposit/intl/ar/utils/validation.json b/staking_deposit/intl/ar/utils/validation.json similarity index 100% rename from eth2deposit/intl/ar/utils/validation.json rename to staking_deposit/intl/ar/utils/validation.json diff --git a/eth2deposit/intl/el/cli/existing_mnemonic.json b/staking_deposit/intl/el/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/el/cli/existing_mnemonic.json rename to staking_deposit/intl/el/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/el/cli/generate_keys.json b/staking_deposit/intl/el/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/el/cli/generate_keys.json rename to staking_deposit/intl/el/cli/generate_keys.json diff --git a/eth2deposit/intl/el/cli/new_mnemonic.json b/staking_deposit/intl/el/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/el/cli/new_mnemonic.json rename to staking_deposit/intl/el/cli/new_mnemonic.json diff --git a/eth2deposit/intl/el/credentials.json b/staking_deposit/intl/el/credentials.json similarity index 100% rename from eth2deposit/intl/el/credentials.json rename to staking_deposit/intl/el/credentials.json diff --git a/eth2deposit/intl/el/deposit.json b/staking_deposit/intl/el/deposit.json similarity index 100% rename from eth2deposit/intl/el/deposit.json rename to staking_deposit/intl/el/deposit.json diff --git a/eth2deposit/intl/el/utils/validation.json b/staking_deposit/intl/el/utils/validation.json similarity index 100% rename from eth2deposit/intl/el/utils/validation.json rename to staking_deposit/intl/el/utils/validation.json diff --git a/eth2deposit/intl/en/cli/existing_mnemonic.json b/staking_deposit/intl/en/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/en/cli/existing_mnemonic.json rename to staking_deposit/intl/en/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/en/cli/generate_keys.json b/staking_deposit/intl/en/cli/generate_keys.json similarity index 85% rename from eth2deposit/intl/en/cli/generate_keys.json rename to staking_deposit/intl/en/cli/generate_keys.json index a5c7d63ae..c1f33b3ba 100644 --- a/eth2deposit/intl/en/cli/generate_keys.json +++ b/staking_deposit/intl/en/cli/generate_keys.json @@ -12,12 +12,12 @@ "help": "The folder path for the keystore(s) and deposit(s). Pointing to `./validator_keys` by default." }, "chain": { - "help": "The version of eth2 you are targeting. Use \"mainnet\" if you are depositing ETH", + "help": "The name of Ethereum PoS chain you are targeting. Use \"mainnet\" if you are depositing ETH", "prompt": "Please choose the (mainnet or testnet) network/chain name" }, "keystore_password": { - "help": "The password that will secure your keystores. You will need to re-enter this to decrypt them when you setup your eth2 validators. (It is recommended not to use this argument, and wait for the CLI to ask you for your mnemonic as otherwise it will appear in your shell history.)", - "prompt": "Create a password that secures your validator keystore(s). You will need to re-enter this to decrypt them when you setup your eth2 validators.", + "help": "The password that will secure your keystores. You will need to re-enter this to decrypt them when you setup your Ethereum validators. (It is recommended not to use this argument, and wait for the CLI to ask you for your mnemonic as otherwise it will appear in your shell history.)", + "prompt": "Create a password that secures your validator keystore(s). You will need to re-enter this to decrypt them when you setup your Ethereum validators.", "confirm": "Repeat your keystore password for confirmation", "mismatch": "Error: the two entered values do not match. Please type again." }, diff --git a/eth2deposit/intl/en/cli/new_mnemonic.json b/staking_deposit/intl/en/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/en/cli/new_mnemonic.json rename to staking_deposit/intl/en/cli/new_mnemonic.json diff --git a/eth2deposit/intl/en/credentials.json b/staking_deposit/intl/en/credentials.json similarity index 100% rename from eth2deposit/intl/en/credentials.json rename to staking_deposit/intl/en/credentials.json diff --git a/eth2deposit/intl/en/deposit.json b/staking_deposit/intl/en/deposit.json similarity index 100% rename from eth2deposit/intl/en/deposit.json rename to staking_deposit/intl/en/deposit.json diff --git a/eth2deposit/intl/en/utils/validation.json b/staking_deposit/intl/en/utils/validation.json similarity index 100% rename from eth2deposit/intl/en/utils/validation.json rename to staking_deposit/intl/en/utils/validation.json diff --git a/eth2deposit/intl/fr/cli/existing_mnemonic.json b/staking_deposit/intl/fr/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/fr/cli/existing_mnemonic.json rename to staking_deposit/intl/fr/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/fr/cli/generate_keys.json b/staking_deposit/intl/fr/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/fr/cli/generate_keys.json rename to staking_deposit/intl/fr/cli/generate_keys.json diff --git a/eth2deposit/intl/fr/cli/new_mnemonic.json b/staking_deposit/intl/fr/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/fr/cli/new_mnemonic.json rename to staking_deposit/intl/fr/cli/new_mnemonic.json diff --git a/eth2deposit/intl/fr/credentials.json b/staking_deposit/intl/fr/credentials.json similarity index 100% rename from eth2deposit/intl/fr/credentials.json rename to staking_deposit/intl/fr/credentials.json diff --git a/eth2deposit/intl/fr/deposit.json b/staking_deposit/intl/fr/deposit.json similarity index 100% rename from eth2deposit/intl/fr/deposit.json rename to staking_deposit/intl/fr/deposit.json diff --git a/eth2deposit/intl/fr/utils/validation.json b/staking_deposit/intl/fr/utils/validation.json similarity index 100% rename from eth2deposit/intl/fr/utils/validation.json rename to staking_deposit/intl/fr/utils/validation.json diff --git a/eth2deposit/intl/id/cli/existing_mnemonic.json b/staking_deposit/intl/id/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/id/cli/existing_mnemonic.json rename to staking_deposit/intl/id/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/id/cli/generate_keys.json b/staking_deposit/intl/id/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/id/cli/generate_keys.json rename to staking_deposit/intl/id/cli/generate_keys.json diff --git a/eth2deposit/intl/id/cli/new_mnemonic.json b/staking_deposit/intl/id/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/id/cli/new_mnemonic.json rename to staking_deposit/intl/id/cli/new_mnemonic.json diff --git a/eth2deposit/intl/id/credentials.json b/staking_deposit/intl/id/credentials.json similarity index 100% rename from eth2deposit/intl/id/credentials.json rename to staking_deposit/intl/id/credentials.json diff --git a/eth2deposit/intl/id/deposit.json b/staking_deposit/intl/id/deposit.json similarity index 100% rename from eth2deposit/intl/id/deposit.json rename to staking_deposit/intl/id/deposit.json diff --git a/eth2deposit/intl/id/utils/validation.json b/staking_deposit/intl/id/utils/validation.json similarity index 100% rename from eth2deposit/intl/id/utils/validation.json rename to staking_deposit/intl/id/utils/validation.json diff --git a/eth2deposit/intl/it/cli/existing_mnemonic.json b/staking_deposit/intl/it/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/it/cli/existing_mnemonic.json rename to staking_deposit/intl/it/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/it/cli/generate_keys.json b/staking_deposit/intl/it/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/it/cli/generate_keys.json rename to staking_deposit/intl/it/cli/generate_keys.json diff --git a/eth2deposit/intl/it/cli/new_mnemonic.json b/staking_deposit/intl/it/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/it/cli/new_mnemonic.json rename to staking_deposit/intl/it/cli/new_mnemonic.json diff --git a/eth2deposit/intl/it/credentials.json b/staking_deposit/intl/it/credentials.json similarity index 100% rename from eth2deposit/intl/it/credentials.json rename to staking_deposit/intl/it/credentials.json diff --git a/eth2deposit/intl/it/deposit.json b/staking_deposit/intl/it/deposit.json similarity index 100% rename from eth2deposit/intl/it/deposit.json rename to staking_deposit/intl/it/deposit.json diff --git a/eth2deposit/intl/it/utils/validation.json b/staking_deposit/intl/it/utils/validation.json similarity index 100% rename from eth2deposit/intl/it/utils/validation.json rename to staking_deposit/intl/it/utils/validation.json diff --git a/eth2deposit/intl/ja/cli/existing_mnemonic.json b/staking_deposit/intl/ja/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/ja/cli/existing_mnemonic.json rename to staking_deposit/intl/ja/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/ja/cli/generate_keys.json b/staking_deposit/intl/ja/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/ja/cli/generate_keys.json rename to staking_deposit/intl/ja/cli/generate_keys.json diff --git a/eth2deposit/intl/ja/cli/new_mnemonic.json b/staking_deposit/intl/ja/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/ja/cli/new_mnemonic.json rename to staking_deposit/intl/ja/cli/new_mnemonic.json diff --git a/eth2deposit/intl/ja/credentials.json b/staking_deposit/intl/ja/credentials.json similarity index 100% rename from eth2deposit/intl/ja/credentials.json rename to staking_deposit/intl/ja/credentials.json diff --git a/eth2deposit/intl/ja/deposit.json b/staking_deposit/intl/ja/deposit.json similarity index 100% rename from eth2deposit/intl/ja/deposit.json rename to staking_deposit/intl/ja/deposit.json diff --git a/eth2deposit/intl/ja/utils/validation.json b/staking_deposit/intl/ja/utils/validation.json similarity index 100% rename from eth2deposit/intl/ja/utils/validation.json rename to staking_deposit/intl/ja/utils/validation.json diff --git a/eth2deposit/intl/ko/cli/existing_mnemonic.json b/staking_deposit/intl/ko/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/ko/cli/existing_mnemonic.json rename to staking_deposit/intl/ko/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/ko/cli/generate_keys.json b/staking_deposit/intl/ko/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/ko/cli/generate_keys.json rename to staking_deposit/intl/ko/cli/generate_keys.json diff --git a/eth2deposit/intl/ko/cli/new_mnemonic.json b/staking_deposit/intl/ko/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/ko/cli/new_mnemonic.json rename to staking_deposit/intl/ko/cli/new_mnemonic.json diff --git a/eth2deposit/intl/ko/credentials.json b/staking_deposit/intl/ko/credentials.json similarity index 100% rename from eth2deposit/intl/ko/credentials.json rename to staking_deposit/intl/ko/credentials.json diff --git a/eth2deposit/intl/ko/deposit.json b/staking_deposit/intl/ko/deposit.json similarity index 100% rename from eth2deposit/intl/ko/deposit.json rename to staking_deposit/intl/ko/deposit.json diff --git a/eth2deposit/intl/ko/utils/validation.json b/staking_deposit/intl/ko/utils/validation.json similarity index 100% rename from eth2deposit/intl/ko/utils/validation.json rename to staking_deposit/intl/ko/utils/validation.json diff --git a/eth2deposit/intl/pt-BR/cli/existing_mnemonic.json b/staking_deposit/intl/pt-BR/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/pt-BR/cli/existing_mnemonic.json rename to staking_deposit/intl/pt-BR/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/pt-BR/cli/generate_keys.json b/staking_deposit/intl/pt-BR/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/pt-BR/cli/generate_keys.json rename to staking_deposit/intl/pt-BR/cli/generate_keys.json diff --git a/eth2deposit/intl/pt-BR/cli/new_mnemonic.json b/staking_deposit/intl/pt-BR/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/pt-BR/cli/new_mnemonic.json rename to staking_deposit/intl/pt-BR/cli/new_mnemonic.json diff --git a/eth2deposit/intl/pt-BR/credentials.json b/staking_deposit/intl/pt-BR/credentials.json similarity index 100% rename from eth2deposit/intl/pt-BR/credentials.json rename to staking_deposit/intl/pt-BR/credentials.json diff --git a/eth2deposit/intl/pt-BR/deposit.json b/staking_deposit/intl/pt-BR/deposit.json similarity index 100% rename from eth2deposit/intl/pt-BR/deposit.json rename to staking_deposit/intl/pt-BR/deposit.json diff --git a/eth2deposit/intl/pt-BR/utils/validation.json b/staking_deposit/intl/pt-BR/utils/validation.json similarity index 100% rename from eth2deposit/intl/pt-BR/utils/validation.json rename to staking_deposit/intl/pt-BR/utils/validation.json diff --git a/eth2deposit/intl/ro/cli/existing_mnemonic.json b/staking_deposit/intl/ro/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/ro/cli/existing_mnemonic.json rename to staking_deposit/intl/ro/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/ro/cli/generate_keys.json b/staking_deposit/intl/ro/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/ro/cli/generate_keys.json rename to staking_deposit/intl/ro/cli/generate_keys.json diff --git a/eth2deposit/intl/ro/cli/new_mnemonic.json b/staking_deposit/intl/ro/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/ro/cli/new_mnemonic.json rename to staking_deposit/intl/ro/cli/new_mnemonic.json diff --git a/eth2deposit/intl/ro/credentials.json b/staking_deposit/intl/ro/credentials.json similarity index 100% rename from eth2deposit/intl/ro/credentials.json rename to staking_deposit/intl/ro/credentials.json diff --git a/eth2deposit/intl/ro/deposit.json b/staking_deposit/intl/ro/deposit.json similarity index 100% rename from eth2deposit/intl/ro/deposit.json rename to staking_deposit/intl/ro/deposit.json diff --git a/eth2deposit/intl/ro/utils/validation.json b/staking_deposit/intl/ro/utils/validation.json similarity index 100% rename from eth2deposit/intl/ro/utils/validation.json rename to staking_deposit/intl/ro/utils/validation.json diff --git a/eth2deposit/intl/zh-CN/cli/existing_mnemonic.json b/staking_deposit/intl/zh-CN/cli/existing_mnemonic.json similarity index 100% rename from eth2deposit/intl/zh-CN/cli/existing_mnemonic.json rename to staking_deposit/intl/zh-CN/cli/existing_mnemonic.json diff --git a/eth2deposit/intl/zh-CN/cli/generate_keys.json b/staking_deposit/intl/zh-CN/cli/generate_keys.json similarity index 100% rename from eth2deposit/intl/zh-CN/cli/generate_keys.json rename to staking_deposit/intl/zh-CN/cli/generate_keys.json diff --git a/eth2deposit/intl/zh-CN/cli/new_mnemonic.json b/staking_deposit/intl/zh-CN/cli/new_mnemonic.json similarity index 100% rename from eth2deposit/intl/zh-CN/cli/new_mnemonic.json rename to staking_deposit/intl/zh-CN/cli/new_mnemonic.json diff --git a/eth2deposit/intl/zh-CN/credentials.json b/staking_deposit/intl/zh-CN/credentials.json similarity index 100% rename from eth2deposit/intl/zh-CN/credentials.json rename to staking_deposit/intl/zh-CN/credentials.json diff --git a/eth2deposit/intl/zh-CN/deposit.json b/staking_deposit/intl/zh-CN/deposit.json similarity index 100% rename from eth2deposit/intl/zh-CN/deposit.json rename to staking_deposit/intl/zh-CN/deposit.json diff --git a/eth2deposit/intl/zh-CN/utils/validation.json b/staking_deposit/intl/zh-CN/utils/validation.json similarity index 100% rename from eth2deposit/intl/zh-CN/utils/validation.json rename to staking_deposit/intl/zh-CN/utils/validation.json diff --git a/eth2deposit/key_handling/__init__.py b/staking_deposit/key_handling/__init__.py similarity index 100% rename from eth2deposit/key_handling/__init__.py rename to staking_deposit/key_handling/__init__.py diff --git a/eth2deposit/key_handling/key_derivation/__init__.py b/staking_deposit/key_handling/key_derivation/__init__.py similarity index 100% rename from eth2deposit/key_handling/key_derivation/__init__.py rename to staking_deposit/key_handling/key_derivation/__init__.py diff --git a/eth2deposit/key_handling/key_derivation/mnemonic.py b/staking_deposit/key_handling/key_derivation/mnemonic.py similarity index 97% rename from eth2deposit/key_handling/key_derivation/mnemonic.py rename to staking_deposit/key_handling/key_derivation/mnemonic.py index c0e61b219..c93c37f4c 100644 --- a/eth2deposit/key_handling/key_derivation/mnemonic.py +++ b/staking_deposit/key_handling/key_derivation/mnemonic.py @@ -6,14 +6,14 @@ Sequence, ) -from eth2deposit.utils.constants import ( +from staking_deposit.utils.constants import ( MNEMONIC_LANG_OPTIONS, ) -from eth2deposit.utils.crypto import ( +from staking_deposit.utils.crypto import ( SHA256, PBKDF2, ) -from eth2deposit.utils.file_handling import ( +from staking_deposit.utils.file_handling import ( resource_path, ) diff --git a/eth2deposit/key_handling/key_derivation/path.py b/staking_deposit/key_handling/key_derivation/path.py similarity index 100% rename from eth2deposit/key_handling/key_derivation/path.py rename to staking_deposit/key_handling/key_derivation/path.py diff --git a/eth2deposit/key_handling/key_derivation/tree.py b/staking_deposit/key_handling/key_derivation/tree.py similarity index 98% rename from eth2deposit/key_handling/key_derivation/tree.py rename to staking_deposit/key_handling/key_derivation/tree.py index 390097f1a..53fcd0ec7 100644 --- a/eth2deposit/key_handling/key_derivation/tree.py +++ b/staking_deposit/key_handling/key_derivation/tree.py @@ -1,4 +1,4 @@ -from eth2deposit.utils.crypto import ( +from staking_deposit.utils.crypto import ( HKDF, SHA256, ) diff --git a/eth2deposit/key_handling/key_derivation/word_lists/chinese_simplified.txt b/staking_deposit/key_handling/key_derivation/word_lists/chinese_simplified.txt similarity index 100% rename from eth2deposit/key_handling/key_derivation/word_lists/chinese_simplified.txt rename to staking_deposit/key_handling/key_derivation/word_lists/chinese_simplified.txt diff --git a/eth2deposit/key_handling/key_derivation/word_lists/chinese_traditional.txt b/staking_deposit/key_handling/key_derivation/word_lists/chinese_traditional.txt similarity index 100% rename from eth2deposit/key_handling/key_derivation/word_lists/chinese_traditional.txt rename to staking_deposit/key_handling/key_derivation/word_lists/chinese_traditional.txt diff --git a/eth2deposit/key_handling/key_derivation/word_lists/czech.txt b/staking_deposit/key_handling/key_derivation/word_lists/czech.txt similarity index 100% rename from eth2deposit/key_handling/key_derivation/word_lists/czech.txt rename to staking_deposit/key_handling/key_derivation/word_lists/czech.txt diff --git a/eth2deposit/key_handling/key_derivation/word_lists/english.txt b/staking_deposit/key_handling/key_derivation/word_lists/english.txt similarity index 100% rename from eth2deposit/key_handling/key_derivation/word_lists/english.txt rename to staking_deposit/key_handling/key_derivation/word_lists/english.txt diff --git a/eth2deposit/key_handling/key_derivation/word_lists/italian.txt b/staking_deposit/key_handling/key_derivation/word_lists/italian.txt similarity index 100% rename from eth2deposit/key_handling/key_derivation/word_lists/italian.txt rename to staking_deposit/key_handling/key_derivation/word_lists/italian.txt diff --git a/eth2deposit/key_handling/key_derivation/word_lists/korean.txt b/staking_deposit/key_handling/key_derivation/word_lists/korean.txt similarity index 100% rename from eth2deposit/key_handling/key_derivation/word_lists/korean.txt rename to staking_deposit/key_handling/key_derivation/word_lists/korean.txt diff --git a/eth2deposit/key_handling/key_derivation/word_lists/portuguese.txt b/staking_deposit/key_handling/key_derivation/word_lists/portuguese.txt similarity index 100% rename from eth2deposit/key_handling/key_derivation/word_lists/portuguese.txt rename to staking_deposit/key_handling/key_derivation/word_lists/portuguese.txt diff --git a/eth2deposit/key_handling/key_derivation/word_lists/spanish.txt b/staking_deposit/key_handling/key_derivation/word_lists/spanish.txt similarity index 100% rename from eth2deposit/key_handling/key_derivation/word_lists/spanish.txt rename to staking_deposit/key_handling/key_derivation/word_lists/spanish.txt diff --git a/eth2deposit/key_handling/keystore.py b/staking_deposit/key_handling/keystore.py similarity index 98% rename from eth2deposit/key_handling/keystore.py rename to staking_deposit/key_handling/keystore.py index 6e9c122d1..75bcddba9 100644 --- a/eth2deposit/key_handling/keystore.py +++ b/staking_deposit/key_handling/keystore.py @@ -12,13 +12,13 @@ from unicodedata import normalize from uuid import uuid4 -from eth2deposit.utils.crypto import ( +from staking_deposit.utils.crypto import ( AES_128_CTR, PBKDF2, scrypt, SHA256, ) -from eth2deposit.utils.constants import ( +from staking_deposit.utils.constants import ( UNICODE_CONTROL_CHARS, ) diff --git a/staking_deposit/settings.py b/staking_deposit/settings.py new file mode 100644 index 000000000..c8dd8e971 --- /dev/null +++ b/staking_deposit/settings.py @@ -0,0 +1,33 @@ +from typing import Dict, NamedTuple + + +DEPOSIT_CLI_VERSION = '1.2.0' + + +class BaseChainSetting(NamedTuple): + NETWORK_NAME: str + GENESIS_FORK_VERSION: bytes + + +MAINNET = 'mainnet' +PYRMONT = 'pyrmont' +PRATER = 'prater' + + +# Mainnet setting +MainnetSetting = BaseChainSetting(NETWORK_NAME=MAINNET, GENESIS_FORK_VERSION=bytes.fromhex('00000000')) +# Pre-launch testnet (spec v1.0.0) +PyrmontSetting = BaseChainSetting(NETWORK_NAME=PYRMONT, GENESIS_FORK_VERSION=bytes.fromhex('00002009')) +# Testnet (spec v1.0.1) +PraterSetting = BaseChainSetting(NETWORK_NAME=PRATER, GENESIS_FORK_VERSION=bytes.fromhex('00001020')) + + +ALL_CHAINS: Dict[str, BaseChainSetting] = { + MAINNET: MainnetSetting, + PYRMONT: PyrmontSetting, + PRATER: PraterSetting, +} + + +def get_chain_setting(chain_name: str = MAINNET) -> BaseChainSetting: + return ALL_CHAINS[chain_name] diff --git a/eth2deposit/utils/__init__.py b/staking_deposit/utils/__init__.py similarity index 100% rename from eth2deposit/utils/__init__.py rename to staking_deposit/utils/__init__.py diff --git a/eth2deposit/utils/ascii_art.py b/staking_deposit/utils/ascii_art.py similarity index 100% rename from eth2deposit/utils/ascii_art.py rename to staking_deposit/utils/ascii_art.py diff --git a/eth2deposit/utils/click.py b/staking_deposit/utils/click.py similarity index 97% rename from eth2deposit/utils/click.py rename to staking_deposit/utils/click.py index e10fad464..422a6ae39 100644 --- a/eth2deposit/utils/click.py +++ b/staking_deposit/utils/click.py @@ -8,8 +8,8 @@ Union, ) -from eth2deposit.exceptions import ValidationError -from eth2deposit.utils import config +from staking_deposit.exceptions import ValidationError +from staking_deposit.utils import config def _value_of(f: Union[Callable[[], Any], Any]) -> Any: diff --git a/eth2deposit/utils/config.py b/staking_deposit/utils/config.py similarity index 100% rename from eth2deposit/utils/config.py rename to staking_deposit/utils/config.py diff --git a/eth2deposit/utils/constants.py b/staking_deposit/utils/constants.py similarity index 89% rename from eth2deposit/utils/constants.py rename to staking_deposit/utils/constants.py index d0a71b20d..42015bb0c 100644 --- a/eth2deposit/utils/constants.py +++ b/staking_deposit/utils/constants.py @@ -7,7 +7,7 @@ ZERO_BYTES32 = b'\x00' * 32 -# Eth2-spec constants taken from https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md +# Execution-spec constants taken from https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md DOMAIN_DEPOSIT = bytes.fromhex('03000000') BLS_WITHDRAWAL_PREFIX = bytes.fromhex('00') ETH1_ADDRESS_WITHDRAWAL_PREFIX = bytes.fromhex('01') @@ -18,11 +18,11 @@ # File/folder constants -WORD_LISTS_PATH = os.path.join('eth2deposit', 'key_handling', 'key_derivation', 'word_lists') +WORD_LISTS_PATH = os.path.join('staking_deposit', 'key_handling', 'key_derivation', 'word_lists') DEFAULT_VALIDATOR_KEYS_FOLDER_NAME = 'validator_keys' # Internationalisation constants -INTL_CONTENT_PATH = os.path.join('eth2deposit', 'intl') +INTL_CONTENT_PATH = os.path.join('staking_deposit', 'intl') def _add_index_to_options(d: Dict[str, List[str]]) -> Dict[str, List[str]]: diff --git a/eth2deposit/utils/crypto.py b/staking_deposit/utils/crypto.py similarity index 100% rename from eth2deposit/utils/crypto.py rename to staking_deposit/utils/crypto.py diff --git a/eth2deposit/utils/file_handling.py b/staking_deposit/utils/file_handling.py similarity index 100% rename from eth2deposit/utils/file_handling.py rename to staking_deposit/utils/file_handling.py diff --git a/eth2deposit/utils/intl.py b/staking_deposit/utils/intl.py similarity index 91% rename from eth2deposit/utils/intl.py rename to staking_deposit/utils/intl.py index 56baeda7e..ca8b63f7b 100644 --- a/eth2deposit/utils/intl.py +++ b/staking_deposit/utils/intl.py @@ -12,14 +12,14 @@ ) import os -from eth2deposit.utils import config -from eth2deposit.utils.constants import ( +from staking_deposit.utils import config +from staking_deposit.utils.constants import ( INTL_CONTENT_PATH, ) -from eth2deposit.utils.file_handling import ( +from staking_deposit.utils.file_handling import ( resource_path, ) -from eth2deposit.exceptions import ValidationError +from staking_deposit.exceptions import ValidationError def _get_from_dict(dataDict: Dict[str, Any], mapList: Iterable[str]) -> str: @@ -54,7 +54,7 @@ def load_text(params: List[str], file_path: str='', func: str='', lang: str='') # Determine path to json text file_path_list = os.path.normpath(file_path).split(os.path.sep) - rel_path_list = file_path_list[file_path_list.index('eth2deposit') + 1:] + rel_path_list = file_path_list[file_path_list.index('staking_deposit') + 1:] json_path = resource_path(os.path.join(INTL_CONTENT_PATH, lang, *rel_path_list)) try: diff --git a/eth2deposit/utils/ssz.py b/staking_deposit/utils/ssz.py similarity index 86% rename from eth2deposit/utils/ssz.py rename to staking_deposit/utils/ssz.py index 8a0b68953..e079a007d 100644 --- a/eth2deposit/utils/ssz.py +++ b/staking_deposit/utils/ssz.py @@ -7,7 +7,7 @@ bytes48, bytes96 ) -from eth2deposit.utils.constants import ( +from staking_deposit.utils.constants import ( DOMAIN_DEPOSIT, ZERO_BYTES32, ) @@ -59,7 +59,7 @@ def compute_signing_root(ssz_object: Serializable, domain: bytes) -> bytes: """ Return the signing root of an object by calculating the root of the object-domain tree. The root is the hash tree root of: - https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#signingdata + https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#signingdata """ if len(domain) != 32: raise ValueError(f"Domain should be in 32 bytes. Got {len(domain)}.") @@ -72,7 +72,7 @@ def compute_signing_root(ssz_object: Serializable, domain: bytes) -> bytes: class DepositMessage(Serializable): """ - Ref: https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#depositmessage + Ref: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#depositmessage """ fields = [ ('pubkey', bytes48), @@ -83,7 +83,7 @@ class DepositMessage(Serializable): class DepositData(Serializable): """ - Ref: https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#depositdata + Ref: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#depositdata """ fields = [ ('pubkey', bytes48), diff --git a/eth2deposit/utils/validation.py b/staking_deposit/utils/validation.py similarity index 89% rename from eth2deposit/utils/validation.py rename to staking_deposit/utils/validation.py index 414d1681e..d3bdd7ab3 100644 --- a/eth2deposit/utils/validation.py +++ b/staking_deposit/utils/validation.py @@ -8,24 +8,24 @@ from py_ecc.bls import G2ProofOfPossession as bls -from eth2deposit.exceptions import ValidationError -from eth2deposit.utils.intl import load_text -from eth2deposit.utils.ssz import ( +from staking_deposit.exceptions import ValidationError +from staking_deposit.utils.intl import load_text +from staking_deposit.utils.ssz import ( compute_deposit_domain, compute_signing_root, DepositData, DepositMessage, ) -from eth2deposit.credentials import ( +from staking_deposit.credentials import ( Credential, ) -from eth2deposit.utils.constants import ( +from staking_deposit.utils.constants import ( MAX_DEPOSIT_AMOUNT, MIN_DEPOSIT_AMOUNT, BLS_WITHDRAWAL_PREFIX, ETH1_ADDRESS_WITHDRAWAL_PREFIX, ) -from eth2deposit.utils.crypto import SHA256 +from staking_deposit.utils.crypto import SHA256 def verify_deposit_data_json(filefolder: str, credentials: Sequence[Credential]) -> bool: @@ -42,8 +42,8 @@ def verify_deposit_data_json(filefolder: str, credentials: Sequence[Credential]) def validate_deposit(deposit_data_dict: Dict[str, Any], credential: Credential) -> bool: ''' - Checks whether a deposit is valid based on the eth2 rules. - https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#deposits + Checks whether a deposit is valid based on the staking deposit rules. + https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#deposits ''' pubkey = BLSPubkey(bytes.fromhex(deposit_data_dict['pubkey'])) withdrawal_credentials = bytes.fromhex(deposit_data_dict['withdrawal_credentials']) diff --git a/test_binary_script.py b/test_binary_script.py index 4c6e747f0..e041d0aa7 100755 --- a/test_binary_script.py +++ b/test_binary_script.py @@ -3,7 +3,7 @@ import sys -# For not importing eth2deposit here +# For not importing staking_deposit here DEFAULT_VALIDATOR_KEYS_FOLDER_NAME = 'validator_keys' diff --git a/test_deposit_script.py b/test_deposit_script.py index 356cde497..66317aa56 100755 --- a/test_deposit_script.py +++ b/test_deposit_script.py @@ -1,7 +1,7 @@ import asyncio import os -# For not importing eth2deposit here +# For not importing staking_deposit here DEFAULT_VALIDATOR_KEYS_FOLDER_NAME = 'validator_keys' diff --git a/tests/test_cli/helpers.py b/tests/test_cli/helpers.py index 5d43d9597..127e04a1d 100644 --- a/tests/test_cli/helpers.py +++ b/tests/test_cli/helpers.py @@ -1,7 +1,7 @@ import os -from eth2deposit.key_handling.keystore import Keystore -from eth2deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME +from staking_deposit.key_handling.keystore import Keystore +from staking_deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME def clean_key_folder(my_folder_path: str) -> None: diff --git a/tests/test_cli/test_existing_menmonic.py b/tests/test_cli/test_existing_menmonic.py index 2740426ed..25e0556df 100644 --- a/tests/test_cli/test_existing_menmonic.py +++ b/tests/test_cli/test_existing_menmonic.py @@ -7,8 +7,8 @@ from eth_utils import decode_hex -from eth2deposit.deposit import cli -from eth2deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME, ETH1_ADDRESS_WITHDRAWAL_PREFIX +from staking_deposit.deposit import cli +from staking_deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME, ETH1_ADDRESS_WITHDRAWAL_PREFIX from.helpers import clean_key_folder, get_permissions, get_uuid diff --git a/tests/test_cli/test_new_mnemonic.py b/tests/test_cli/test_new_mnemonic.py index 944963602..098bc6a85 100644 --- a/tests/test_cli/test_new_mnemonic.py +++ b/tests/test_cli/test_new_mnemonic.py @@ -7,10 +7,10 @@ from eth_utils import decode_hex -from eth2deposit.cli import new_mnemonic -from eth2deposit.deposit import cli -from eth2deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME, ETH1_ADDRESS_WITHDRAWAL_PREFIX -from eth2deposit.utils.intl import load_text +from staking_deposit.cli import new_mnemonic +from staking_deposit.deposit import cli +from staking_deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME, ETH1_ADDRESS_WITHDRAWAL_PREFIX +from staking_deposit.utils.intl import load_text from .helpers import clean_key_folder, get_permissions, get_uuid @@ -144,7 +144,7 @@ async def test_script() -> None: seed_phrase = '' parsing = False - mnemonic_json_file = os.path.join(os.getcwd(), 'eth2deposit/../eth2deposit/cli/', 'new_mnemonic.json') + mnemonic_json_file = os.path.join(os.getcwd(), 'staking_deposit/../staking_deposit/cli/', 'new_mnemonic.json') async for out in proc.stdout: output = out.decode('utf-8').rstrip() if output.startswith(load_text(['msg_mnemonic_presentation'], mnemonic_json_file, 'new_mnemonic')): diff --git a/tests/test_cli/test_regeneration.py b/tests/test_cli/test_regeneration.py index 2c27892b6..776875835 100644 --- a/tests/test_cli/test_regeneration.py +++ b/tests/test_cli/test_regeneration.py @@ -3,9 +3,9 @@ from pathlib import Path from click.testing import CliRunner -from eth2deposit.cli import new_mnemonic -from eth2deposit.deposit import cli -from eth2deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME +from staking_deposit.cli import new_mnemonic +from staking_deposit.deposit import cli +from staking_deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME from .helpers import clean_key_folder, get_permissions, get_uuid diff --git a/tests/test_credentials.py b/tests/test_credentials.py index 536693011..7fcdcee0b 100644 --- a/tests/test_credentials.py +++ b/tests/test_credentials.py @@ -1,7 +1,7 @@ import pytest -from eth2deposit.credentials import CredentialList -from eth2deposit.settings import MainnetSetting +from staking_deposit.credentials import CredentialList +from staking_deposit.settings import MainnetSetting def test_from_mnemonic() -> None: diff --git a/tests/test_intl/test_json_schema.py b/tests/test_intl/test_json_schema.py index 24f0db3c9..d6710c169 100644 --- a/tests/test_intl/test_json_schema.py +++ b/tests/test_intl/test_json_schema.py @@ -7,7 +7,7 @@ List, ) -from eth2deposit.utils.constants import INTL_CONTENT_PATH +from staking_deposit.utils.constants import INTL_CONTENT_PATH TEST_SCHEMAS_FOLDER = os.path.join(os.path.dirname(__file__), 'schemas') diff --git a/tests/test_key_handling/test_key_derivation/test_mnemonic.py b/tests/test_key_handling/test_key_derivation/test_mnemonic.py index b5096105f..a913e3918 100644 --- a/tests/test_key_handling/test_key_derivation/test_mnemonic.py +++ b/tests/test_key_handling/test_key_derivation/test_mnemonic.py @@ -5,10 +5,10 @@ Sequence, ) -from eth2deposit.utils.constants import ( +from staking_deposit.utils.constants import ( MNEMONIC_LANG_OPTIONS, ) -from eth2deposit.key_handling.key_derivation.mnemonic import ( +from staking_deposit.key_handling.key_derivation.mnemonic import ( _index_to_word, _get_word_list, get_seed, @@ -17,7 +17,7 @@ ) -WORD_LISTS_PATH = os.path.join(os.getcwd(), 'eth2deposit', 'key_handling', 'key_derivation', 'word_lists') +WORD_LISTS_PATH = os.path.join(os.getcwd(), 'staking_deposit', 'key_handling', 'key_derivation', 'word_lists') all_languages = MNEMONIC_LANG_OPTIONS.keys() test_vector_filefolder = os.path.join('tests', 'test_key_handling', diff --git a/tests/test_key_handling/test_key_derivation/test_path.py b/tests/test_key_handling/test_key_derivation/test_path.py index 55cd1b2c3..87e001aca 100644 --- a/tests/test_key_handling/test_key_derivation/test_path.py +++ b/tests/test_key_handling/test_key_derivation/test_path.py @@ -2,14 +2,14 @@ import json import pytest -from eth2deposit.key_handling.key_derivation.tree import ( +from staking_deposit.key_handling.key_derivation.tree import ( _flip_bits_256, _IKM_to_lamport_SK, _parent_SK_to_lamport_PK, _HKDF_mod_r, ) -from eth2deposit.key_handling.key_derivation.path import ( +from staking_deposit.key_handling.key_derivation.path import ( mnemonic_and_path_to_key, path_to_nodes, ) diff --git a/tests/test_key_handling/test_key_derivation/test_tree.py b/tests/test_key_handling/test_key_derivation/test_tree.py index 6a6bd1c83..39511d07e 100644 --- a/tests/test_key_handling/test_key_derivation/test_tree.py +++ b/tests/test_key_handling/test_key_derivation/test_tree.py @@ -4,7 +4,7 @@ import pytest -from eth2deposit.key_handling.key_derivation.tree import ( +from staking_deposit.key_handling.key_derivation.tree import ( _HKDF_mod_r, derive_child_SK, derive_master_SK, diff --git a/tests/test_key_handling/test_keystore.py b/tests/test_key_handling/test_keystore.py index add35b885..696aa201f 100644 --- a/tests/test_key_handling/test_keystore.py +++ b/tests/test_key_handling/test_keystore.py @@ -2,7 +2,7 @@ import json import pytest -from eth2deposit.key_handling.keystore import ( +from staking_deposit.key_handling.keystore import ( Keystore, ScryptKeystore, Pbkdf2Keystore, diff --git a/tests/test_utils/test_constants.py b/tests/test_utils/test_constants.py index 066521270..3c4140750 100644 --- a/tests/test_utils/test_constants.py +++ b/tests/test_utils/test_constants.py @@ -4,7 +4,7 @@ List, ) -from eth2deposit.utils.constants import _add_index_to_options +from staking_deposit.utils.constants import _add_index_to_options @pytest.mark.parametrize( diff --git a/tests/test_utils/test_crypto.py b/tests/test_utils/test_crypto.py index 756121930..2202c8da2 100644 --- a/tests/test_utils/test_crypto.py +++ b/tests/test_utils/test_crypto.py @@ -1,6 +1,6 @@ import pytest -from eth2deposit.utils.crypto import ( +from staking_deposit.utils.crypto import ( scrypt, PBKDF2, AES_128_CTR, diff --git a/tests/test_utils/test_intl.py b/tests/test_utils/test_intl.py index cec72300d..de4ffc9c4 100644 --- a/tests/test_utils/test_intl.py +++ b/tests/test_utils/test_intl.py @@ -4,11 +4,11 @@ List, ) -from eth2deposit.utils.constants import ( +from staking_deposit.utils.constants import ( INTL_LANG_OPTIONS, MNEMONIC_LANG_OPTIONS, ) -from eth2deposit.utils.intl import ( +from staking_deposit.utils.intl import ( fuzzy_reverse_dict_lookup, get_first_options, load_text, @@ -17,9 +17,9 @@ @pytest.mark.parametrize( 'params, file_path, func, lang, found_str', [ - (['arg_mnemonic_language', 'prompt'], os.path.join('eth2deposit', 'cli', 'new_mnemonic.json'), + (['arg_mnemonic_language', 'prompt'], os.path.join('staking_deposit', 'cli', 'new_mnemonic.json'), 'new_mnemonic', 'en', 'Please choose your mnemonic language'), - (['arg_mnemonic_language', 'prompt'], os.path.join('eth2deposit', 'cli', 'new_mnemonic.json'), + (['arg_mnemonic_language', 'prompt'], os.path.join('staking_deposit', 'cli', 'new_mnemonic.json'), 'new_mnemonic', 'ja', 'ニーモニックの言語を選択してください'), ] ) @@ -29,13 +29,13 @@ def test_load_text(params: List[str], file_path: str, func: str, lang: str, foun @pytest.mark.parametrize( 'params, file_path, func, lang, valid', [ - (['arg_mnemonic_language', 'prompt'], os.path.join('eth2deposit', 'cli', 'new_mnemonic.json'), + (['arg_mnemonic_language', 'prompt'], os.path.join('staking_deposit', 'cli', 'new_mnemonic.json'), 'new_mnemonic', 'zz', True), # invalid language, should revert to english - (['arg_mnemonic_language'], os.path.join('eth2deposit', 'cli', 'new_mnemonic.json'), + (['arg_mnemonic_language'], os.path.join('staking_deposit', 'cli', 'new_mnemonic.json'), 'new_mnemonic', 'en', False), # incomplete params - (['arg_mnemonic_language', 'prompt'], os.path.join('eth2deposit', 'cli', 'invalid.json'), + (['arg_mnemonic_language', 'prompt'], os.path.join('staking_deposit', 'cli', 'invalid.json'), 'new_mnemonic', 'en', False), # invalid json path - (['arg_mnemonic_language', 'prompt'], os.path.join('eth2deposit', 'cli', 'invalid.json'), + (['arg_mnemonic_language', 'prompt'], os.path.join('staking_deposit', 'cli', 'invalid.json'), 'new_mnemonic', 'zz', False), # invalid json path in invalid language ] ) diff --git a/tests/test_utils/test_ssz.py b/tests/test_utils/test_ssz.py index 16e52fa8a..d8821de45 100644 --- a/tests/test_utils/test_ssz.py +++ b/tests/test_utils/test_ssz.py @@ -1,6 +1,6 @@ import pytest -from eth2deposit.utils.ssz import ( +from staking_deposit.utils.ssz import ( DepositMessage, compute_deposit_domain, compute_deposit_fork_data_root, diff --git a/tests/test_utils/test_validation.py b/tests/test_utils/test_validation.py index 2608000a1..c0b9c89ff 100644 --- a/tests/test_utils/test_validation.py +++ b/tests/test_utils/test_validation.py @@ -3,8 +3,8 @@ Any, ) -from eth2deposit.exceptions import ValidationError -from eth2deposit.utils.validation import ( +from staking_deposit.exceptions import ValidationError +from staking_deposit.utils.validation import ( validate_int_range, validate_password_strength, ) diff --git a/tox.ini b/tox.ini index 4c3f399f3..698580604 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ commands= deps={[common-install]deps} commands= flake8 --config={toxinidir}/flake8.ini {toxinidir}/tests - mypy --config-file {toxinidir}/mypy.ini -p eth2deposit + mypy --config-file {toxinidir}/mypy.ini -p staking_deposit [common-script] deps=