From de5575310b86d98c5ba438ad0286517350ac2e62 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Tue, 28 Jul 2020 02:47:09 +0800 Subject: [PATCH] Update README --- README.md | 304 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 255 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 2a9a04b..f8dad52 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,47 @@ -**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* + +- [Pre-production warning](#pre-production-warning) - [Tutorial for users](#tutorial-for-users) - - [Requirements](#requirements) + - [Build requirements](#build-requirements) - [For Linux or MacOS users](#for-linux-or-macos-users) - - [Step 1. Install deposit-cli dependencies](#step-1-install-deposit-cli-dependencies) - - [Step 2. Create your keys and deposit data](#step-2-create-your-keys-and-deposit-data) - - [Arguments](#arguments) + - [Option 1. Download binary executable file](#option-1-download-binary-executable-file) + - [Step 1. Installation](#step-1-installation) + - [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json) + - [Arguments](#arguments) + - [Successful message](#successful-message) + - [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python) + - [Step 0. Python version checking](#step-0-python-version-checking) + - [Step 1. Installation](#step-1-installation-1) + - [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-1) + - [Arguments](#arguments-1) + - [Successful message](#successful-message-1) + - [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv) + - [Step 0. Python version checking](#step-0-python-version-checking-1) + - [Step 1. Installation](#step-1-installation-2) + - [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-2) + - [Arguments](#arguments-2) + - [Successful message](#successful-message-2) - [For Windows users](#for-windows-users) - - [Step 1. Install deposit-cli dependencies](#step-1-install-deposit-cli-dependencies-1) - - [Step 2. Create your keys and deposit data](#step-2-create-your-keys-and-deposit-data-1) - - [Arguments](#arguments-1) - - [For `venv` users](#for-venv-users) + - [Option 1. Download binary executable file](#option-1-download-binary-executable-file-1) + - [Step 1. Installation](#step-1-installation-3) + - [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-3) + - [Arguments](#arguments-3) + - [Successful message](#successful-message-3) + - [Option 2. Build `deposit-cli` with native Python](#option-2-build-deposit-cli-with-native-python-1) + - [Step 0. Python version checking](#step-0-python-version-checking-2) + - [Step 1. Installation](#step-1-installation-4) + - [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-4) + - [Arguments](#arguments-4) + - [Successful message](#successful-message-4) + - [Option 3. Build `deposit-cli` with `virtualenv`](#option-3-build-deposit-cli-with-virtualenv-1) + - [Step 0. Python version checking](#step-0-python-version-checking-3) + - [Step 1. Installation](#step-1-installation-5) + - [Step 2. Create keys and `deposit_data-*.json`](#step-2-create-keys-and-deposit_data-json-5) + - [Arguments](#arguments-5) + - [Successful message](#successful-message-5) - [Development](#development) - [Install basic requirements](#install-basic-requirements) - [Install testing requirements](#install-testing-requirements) @@ -28,36 +56,36 @@ This software is a pre-release version which has not yet been audited and theref ## Tutorial for users -### Requirements +### Build requirements - [Python **3.7+**](https://www.python.org/about/gettingstarted/) - [pip3](https://pip.pypa.io/en/stable/installing/) ### For Linux or MacOS users -#### Step 1. Install deposit-cli dependencies +#### Option 1. Download binary executable file -If it's your first time to use this tool, you need to install the Python library dependencies: +##### Step 1. Installation -```sh -./deposit.sh install -``` +See [releases page](https://github.com/ethereum/eth2.0-deposit-cli/releases) to download and decompress the corresponding binary files. -#### Step 2. Create your keys and deposit data +##### Step 2. Create keys and `deposit_data-*.json` Run the following command to enter the interactive CLI: ```sh -./deposit.sh +./deposit ``` You can also run the tool with optional arguments: ```sh -./deposit.sh --num_validators= --mnemonic_language=english --folder= +./deposit --num_validators= --mnemonic_language=english --chain= --folder= ``` -#### Arguments +###### Arguments + +You can use `--help` flag to see all arguments. | Argument | Type | Description | | -------- | -------- | -------- | @@ -66,36 +94,10 @@ You can also run the tool with optional arguments: | `--folder` | String. Pointing to `./validator_keys` by default | The folder path for the keystore(s) and deposit(s) | | `--chain` | String. `mainnet` by defualt | The chain setting for the signing domain. | -### For Windows users - -#### Step 1. Install deposit-cli dependencies - -If it's your first time to use this tool, you need to install the Python library dependencies: - -```sh -sh deposit.sh install -``` - -#### Step 2. Create your keys and deposit data - -Run the following command to enter the interactive CLI: - -```sh -sh deposit.sh -``` - -You can also run the tool with optional arguments: - -```sh -sh deposit.sh --num_validators= --mnemonic_language=english --folder= -``` +###### Successful message You will see the following messages after successfully generated the keystore(s) and the deposit(s): -#### Arguments - -See [here](#arguments) - ``` Creating your keys. Saving your keystore(s). @@ -107,14 +109,218 @@ Success! Your keys can be found at: ``` -### For `venv` users +#### Option 2. Build `deposit-cli` with native Python -If you want to use Python [`venv`](https://docs.python.org/3.7/library/venv.html), just run: +##### Step 0. Python version checking + +Ensure you are using Python version >= Python3.7: ```sh -make venv_deposit +python3 -V ``` +##### Step 1. Installation + +Install the dependencies: + +```sh +pip3 install -r requirements.txt +python3 setup.py install +``` + +Or use the helper script: + +```sh +./deposit.sh install +``` + +##### Step 2. Create keys and `deposit_data-*.json` + +Run the following command to enter the interactive CLI: + +```sh +./deposit.sh +``` + +You can also run the tool with optional arguments: + +```sh +./deposit.sh --num_validators= --mnemonic_language=english --chain= --folder= +``` + +###### Arguments +See [here](#arguments) + +###### Successful message +See [here](#successful-message) + +#### Option 3. Build `deposit-cli` with `virtualenv` + +##### Step 0. Python version checking + +Ensure you are using Python version >= Python3.7: + +```sh +python -V +``` + +##### Step 1. Installation + +For the [virtualenv](https://virtualenv.pypa.io/en/latest/) users, you can create a new venv: + +```sh +virtualenv venv +./venv/bin/activate +``` + +and install the dependencies: + +```sh +python setup.py install +pip install -r requirements.txt +``` + +##### Step 2. Create keys and `deposit_data-*.json` + +Run the following command to enter the interactive CLI: + +```sh +python ./eth2deposit/deposit.py +``` + +You can also run the tool with optional arguments: + +```sh +python ./eth2deposit/deposit.py --num_validators= --mnemonic_language=english --chain= --folder= +``` + +###### Arguments +See [here](#arguments) + +###### Successful message +See [here](#successful-message) + +---- + +### For Windows users + +#### Option 1. Download binary executable file + +##### Step 1. Installation + +See [releases page](https://github.com/ethereum/eth2.0-deposit-cli/releases) to download and decompress the corresponding binary files. + +##### Step 2. Create keys and `deposit_data-*.json` + +Run the following command to enter the interactive CLI: + +```sh +deposit.exe +``` + +You can also run the tool with optional arguments: + +```sh +deposit.exe --num_validators= --mnemonic_language=english --chain= --folder= +``` + +###### Arguments +See [here](#arguments) + +###### Successful message +See [here](#successful-message) + +#### Option 2. Build `deposit-cli` with native Python + +##### Step 0. Python version checking + +Ensure you are using Python version >= Python3.7: + +```sh +python -V +``` + +##### Step 1. Installation + +Install the dependencies: + +```sh +pip install -r requirements.txt +python setup.py install +``` + +Or use the helper script: + +```sh +sh deposit.sh install +``` + +##### Step 2. Create keys and `deposit_data-*.json` + +Run the following command to enter the interactive CLI: + +```sh +sh deposit.sh +``` + +You can also run the tool with optional arguments: + +```sh +sh deposit.sh --num_validators= --mnemonic_language=english --chain= --folder= +``` + +###### Arguments +See [here](#arguments) + +###### Successful message +See [here](#successful-message) + +#### Option 3. Build `deposit-cli` with `virtualenv` + +##### Step 0. Python version checking + +Ensure you are using Python version >= Python3.7: + +```sh +python -V +``` + +##### Step 1. Installation + +For the [virtualenv](https://virtualenv.pypa.io/en/latest/) users, you can create a new venv: + +```sh +virtualenv venv +./venv/bin/activate +``` + +and install the dependencies: + +```sh +python setup.py install +pip install -r requirements.txt +``` + +##### Step 2. Create keys and `deposit_data-*.json` + +Run the following command to enter the interactive CLI: + +```sh +python ./eth2deposit/deposit.py +``` + +You can also run the tool with optional arguments: + +```sh +python ./eth2deposit/deposit.py --num_validators= --mnemonic_language=english --chain= --folder= +``` + +###### Arguments +See [here](#arguments) + +###### Successful message +See [here](#successful-message) + ## Development ### Install basic requirements