Skip to content

Commit

Permalink
Updating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
valefar-on-discord committed Jun 9, 2024
1 parent aa7d961 commit 395e9cd
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 12 deletions.
1 change: 0 additions & 1 deletion docs/book.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[book]
authors = ["valefar-on-discord"]
language = "en"
multilingual = false
src = "src"
4 changes: 3 additions & 1 deletion docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Summary

- [Introduction](README.md)
- [Ethstaker Deposit CLI](landing.md)
- [Quick Setup](quick_setup.md)
- [New Mnemonic](new_mnemonic.md)
- [Existing Mnemonic](existing_mnemonic.md)
- [Generate BLS to Execution Change](generate_bls_to_execution_change.md)
- [Exit Transaction Keystore](exit_transaction_keystore.md)
- [Exit Transaction Mnemonic](exit_transaction_mnemonic.md)
- [Local Development](local_development.md)
13 changes: 10 additions & 3 deletions docs/src/existing_mnemonic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,27 @@ Uses an existing BIP-39 mnemonic phrase for key generation.

## Arguments

- **`--chain`**: The chain to use for generating the deposit data. Options are: 'mainnet', 'holesky', etc...

- **`--mnemonic`**: The mnemonic you used to create withdrawal credentials.

- **`--mnemonic_password`**: The mnemonic password you used in your key generation. Note: It's not the keystore password.

- **`--validator_start_index`**: The index of the first validator's keys you wish to generate. If this is your first time generating keys with this mnemonic, use 0. If you have generated keys using this mnemonic before, use the next index from which you want to start generating keys from (eg, if you've generated 4 keys before (keys #0, #1, #2, #3), then enter 4 here.

- **`--num_validators`**: Number of validators to create.

- **`--chain`**: The chain to use for generating the deposit data. Options are: 'mainnet', 'holesky', etc.

- **`--folder`**: The folder where keystore and deposit data files will be saved.
- **`--keystore_password`**: The password that is used to encrypt the provided keystore. Note: It's not your mnemonic password.

- **`--execution_address`**: The Ethereum 1 address for validator withdrawals.

- **`--pbkdf2`**: Will use pbkdf2 key derivation instead of scrypt for generated keystore files as defined in [EIP-2335](https://eips.ethereum.org/EIPS/eip-2335#decryption-key). This can be a good alternative if you intend to work with a large number of keys.

- **`--folder`**: The folder where keystore and deposit data files will be saved.


## Example Usage

```sh
./deposit existing-mnemonic
```
1 change: 1 addition & 0 deletions docs/src/exit_transaction_keystore.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Creates an exit transaction using a keystore file.

```sh
./deposit exit-transaction-keystore --keystore /path/to/keystore.json
```
1 change: 1 addition & 0 deletions docs/src/exit_transaction_mnemonic.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ Creates an exit transaction using a mnemonic phrase.

```sh
./deposit exit-transaction-mnemonic
```
2 changes: 1 addition & 1 deletion docs/src/generate_bls_to_execution_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Generates a BLS to execution address change message.

- **`--devnet_chain_setting`**: The custom chain setting of a devnet or testnet. Note that it will override your `--chain` choice.


## Example Usage

```sh
./deposit generate-bls-to-execution-change
```
10 changes: 9 additions & 1 deletion docs/src/README.md → docs/src/landing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ Here are some core recommendations:

- **Create backups of your mnemonic**: The mnemonic generated by this tool is crucial to your operation and success as a validator. Losing this mnemonic can put you at significant risk of losing your funds. Follow the instructions carefully when creating a mnemonic, ensure you make a backup copy, and store it in a safe location.

## Getting Started

If you want to start creating validator keys, please follow the [Quick Setup Instructions](quick_setup.md) or if you would like to run locally, view the [Local Development Instructions](local_development.md).

## Commands

**You are not required to specify each argument when executing the command. We will prompt you for each argument for security purposes.**

If there is a specific command you would like to understand more, please choose from the following list:

- **[new-mnemonic](new_mnemonic.md)**: Used to generate a new mnemonic, validator keys, and deposit file. It is not recommended to use this command if you have existing validators.

- **[existing-mnemonic](existing_mnemonic.md)**: Provide a mnemonic to regenerate validator keys or create new ones.
Expand All @@ -28,7 +36,7 @@ Here are some core recommendations:

## Contributing

This project is open-source and welcomes contributions from the community. If you would like to contribute to the `ethstaker-deposit-cli`, please refer to the contributing guidelines in the repository. Your contributions can help improve the tool and make Ethereum staking more accessible to everyone.
This project is open-source and welcomes contributions from the community. If you would like to contribute to the `ethstaker-deposit-cli`, please read the [Local Development Instructions](local_development.md), fork the project, and create a pull request with a description of the changes you have made and why.

## Support

Expand Down
46 changes: 46 additions & 0 deletions docs/src/local_development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Local Development Instructions

To install the `ethstaker-deposit-cli`, follow these steps:

## Prerequisites

Ensure you have the following software installed on your system:

- **Git**: Version control system to clone the repository. [Download Git](https://git-scm.com/downloads)
- **Python 3.12+**: The programming language required to run the tool. [Download Python](https://www.python.org/downloads/)
- **pip**: Package installer for Python, which is included with Python 3.12+.


## Local Development Steps

1. **Clone the Repository**

```sh
git clone https://github.com/eth-educators/ethstaker-deposit-cli.git
```

2. **Navigate to the Project Directory**

```sh
cd ethstaker-deposit-cli
```

3. **Install Dependencies**

```sh
pip3 install -r requirements.txt
```

4. **Run the CLI**

You can now run the CLI tool using the following command:

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

**To execute tests, you will need to install the test dependencies**:
```sh
python3 -m pip install -r requirements_test.txt
python3 -m pytest tests
```
13 changes: 8 additions & 5 deletions docs/src/new_mnemonic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ Generates a new BIP-39 mnemonic along with validator keystore and deposit files

## Arguments

- **`--num_validators`**: Number of validators to create. (Default: 1)
- **`--mnemonic_language`**: The language of the BIP-39 mnemonic. Options are: 'chinese_simplified', 'chinese_traditional', 'czech', 'english', 'french', 'italian', 'japanese', 'korean', 'portuguese', 'spanish'.

- **`--mnemonic_language`**: The language of the BIP-39 mnemonic. Options are: 'chinese_simplified', 'chinese_traditional', 'czech', 'english', 'french', 'italian', 'japanese', 'korean', 'portuguese', 'spanish'. (Default: 'english')
- **`--chain`**: The chain to use for generating the deposit data. Options are: 'mainnet', 'holesky', etc...

- **`--chain`**: The chain to use for generating the deposit data. Options are: 'mainnet', 'holesky', etc... (Default: 'mainnet')
- **`--num_validators`**: Number of validators to create.

- **`--folder`**: The folder where keystore and deposit data files will be saved. (Default: current directory)
- **`--keystore_password`**: The password that is used to encrypt the provided keystore. Note: It's not your mnemonic password.

- **`--execution_address`**: The Ethereum 1 address for validator withdrawals. (Default: None)
- **`--execution_address`**: The Ethereum 1 address for validator withdrawals.

- **`--pbkdf2`**: Will use pbkdf2 key derivation instead of scrypt for generated keystore files as defined in [EIP-2335](https://eips.ethereum.org/EIPS/eip-2335#decryption-key). This can be a good alternative if you intend to work with a large number of keys.

- **`--folder`**: The folder where keystore and deposit data files will be saved.

## Example Usage

```sh
./deposit new-mnemonic
```
53 changes: 53 additions & 0 deletions docs/src/quick_setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Quick Setup

This guide will walk you through the steps to download and set up the `ethstaker-deposit-cli` for your operating system.

## Step 1: Download the Latest Release

1. Navigate to the [Releases page](https://github.com/eth-educators/ethstaker-deposit-cli/releases) of the `ethstaker-deposit-cli` repository.

2. Download the corresponding file for your operating system:
- **Windows**: Look for a file with `windows` in the name.
- **MacOS**: Look for a file with `darwin` in the name.
- **Linux**: Look for a file with `linux` in the name.

3. Extract the contents of the zipped file

4. Open a terminal or command prompt and navigate to the extracted folder


## Step 2: Verify the Installation

1. Make sure you have GPG installed.

2. Make sure you have the `[email protected]` public key by running
```sh
gpg --keyserver keys.openpgp.org --search-keys '[email protected]'
```

3. Verify the signature file against the corresponding file but be sure to replace the contents with the exact file name:
```sh
gpg --verify staking_deposit-cli-***.asc staking_deposit-cli-***
```

4. You should see `Good signature from "EDC Security <[email protected]>"` in the output **otherwise do not continue**.

## Step 3: Usage

**MacOS users:** In order to run from the terminal, you must first open the file to bypass MacOS code signing issues. Do so by right clicking the `deposit` file and then selecting `Open`.

Determine which command best suites what you would like to accomplish:

- **[new-mnemonic](new_mnemonic.md)**: Used to generate a new mnemonic, validator keys, and deposit file. It is not recommended to use this command if you have existing validators.

- **[existing-mnemonic](existing_mnemonic.md)**: Provide a mnemonic to regenerate validator keys or create new ones.

- **[generate-bls-to-execution-change](generate_bls_to_execution_change.md)**: Update your withdrawal credentials of existing validators. It is **required** to have the corresponding mnemonic.

- **[exit-transaction-keystore](exit_transaction_keystore.md)**: Generate an exit message using the keystore of your validators.

- **[exit-transaction-mnemonic](exit_transaction_mnemonic.md)**: Generate an exit message using the mnemonic of your validators.

---

If you encounter any issues, please check the [issues page](https://github.com/eth-educators/ethstaker-deposit-cli/issues) for help or to report a problem. You may also contact us on the [Ethstaker discord](https://dsc.gg/ethstaker).

0 comments on commit 395e9cd

Please sign in to comment.