Doc fixes (#1762)
## Issue Addressed N/A ## Proposed Changes Minor doc fixes. Adds a section on custom data directories. Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
parent
a0634cc64f
commit
aadbab47cc
@ -20,8 +20,7 @@ You may read this book from start to finish, or jump to some of these topics:
|
||||
- Follow the [Installation Guide](./installation.md) to install Lighthouse.
|
||||
- Get hacking with the [Development Environment Guide](./setup.md).
|
||||
- Utilize the whole stack by starting a [local testnet](./local-testnets.md).
|
||||
- Query the [RESTful HTTP API](./http.md) using `curl`.
|
||||
- Listen to events with the [JSON WebSocket API](./websockets.md).
|
||||
- Query the [RESTful HTTP API](./api.md) using `curl`.
|
||||
|
||||
|
||||
Prospective contributors can read the [Contributing](./contributing.md) section
|
||||
|
@ -37,9 +37,9 @@ items, starting at one easy-to-backup mnemonic and ending with multiple
|
||||
keypairs. Creating a single validator looks like this:
|
||||
|
||||
1. Create a **wallet** and record the **mnemonic**:
|
||||
- `lighthouse account wallet create --name wally --password-file wally.pass`
|
||||
- `lighthouse --testnet medalla account wallet create --name wally --password-file wally.pass`
|
||||
1. Create the voting and withdrawal **keystores** for one validator:
|
||||
- `lighthouse account validator create --wallet-name wally --wallet-password wally.pass --count 1`
|
||||
- `lighthouse --testnet medalla account validator create --wallet-name wally --wallet-password wally.pass --count 1`
|
||||
|
||||
|
||||
In step (1), we created a wallet in `~/.lighthouse/{testnet}/wallets` with the name
|
||||
|
@ -43,10 +43,12 @@ keystores that correspond to one or more indices in the mnemonic:
|
||||
|
||||
|
||||
For each of the indices recovered in the above commands, a directory will be
|
||||
created in the `--validator-dir` location (default `~/.lighthouse/validator`)
|
||||
created in the `--validator-dir` location (default `~/.lighthouse/{testnet}/validators`)
|
||||
which contains all the information necessary to run a validator using the
|
||||
`lighthouse vc` command. The password to this new keystore will be placed in
|
||||
the `--secrets-dir` (default `~/.lighthouse/secrets`).
|
||||
the `--secrets-dir` (default `~/.lighthouse/{testnet}/secrets`).
|
||||
|
||||
where `testnet` is the name of the testnet passed in the `--testnet` parameter (default is `medalla`).
|
||||
|
||||
## Recover a EIP-2386 wallet
|
||||
|
||||
|
@ -115,6 +115,9 @@ lighthouse --testnet MY_TESTNET bn --staking
|
||||
lighthouse --testnet MY_TESTNET vc
|
||||
```
|
||||
|
||||
> Note: `~/.lighthouse/{testnet}` is the default directory which contains the keys and databases.
|
||||
> To specify a custom dir, see [this](#custom-directories) section
|
||||
|
||||
#### Docker users
|
||||
|
||||
Those using Docker images can start the processes with:
|
||||
@ -160,3 +163,20 @@ If you see any `ERRO` (error) logs, please reach out on
|
||||
issue](https://github.com/sigp/lighthouse/issues/new).
|
||||
|
||||
Happy staking!
|
||||
|
||||
|
||||
## Custom directories
|
||||
|
||||
Users can override the default Lighthouse data directories (`~/.lighthouse/{testnet}`) using the `--datadir` flag. The custom data directory mirrors the structure of any testnet specific default directory (e.g. `~/.lighthouse/medalla`).
|
||||
|
||||
> Note: Users should specify different custom directories for different testnets.
|
||||
|
||||
Below is an example flow for importing validator keys, running a beacon node and validator client using a custom data directory `/var/lib/my-custom-dir` for the medalla testnet.
|
||||
|
||||
```bash
|
||||
lighthouse --testnet medalla --datadir /var/lib/my-custom-dir account validator import --directory <PATH-TO-LAUNCHPAD-KEYS-DIRECTORY>
|
||||
lighthouse --testnet medalla --datadir /var/lib/my-custom-dir bn --staking
|
||||
lighthouse --testnet medalla --datadir /var/lib/my-custom-dir vc
|
||||
```
|
||||
The first step creates a `validators` directory under `/var/lib/my-custom-dir` which contains the imported keys and [`validator_definitions.yml`](./validator-management.md).
|
||||
After that, we simply run the beacon chain and validator client with the custom dir path.
|
@ -71,7 +71,7 @@ lighthouse --testnet medalla account validator create --name wally --wallet-pass
|
||||
|
||||
This command will:
|
||||
|
||||
- Derive a single new BLS keypair from `wally`, updating it so that it generates a
|
||||
- Derive a single new BLS keypair from wallet `wally` in `~/.lighthouse/{testnet}/wallets`, updating it so that it generates a
|
||||
new key next time.
|
||||
- Create a new directory in `~/.lighthouse/{testnet}/validators` containing:
|
||||
- An encrypted keystore containing the validators voting keypair.
|
||||
|
@ -25,8 +25,8 @@ website). If this is not the case, simply change the `--directory` to point to
|
||||
the `validator_keys` directory.
|
||||
|
||||
Now, assuming that the user is in the `eth2-deposit-cli` directory and they're
|
||||
using the standard `validators` directory (specify a different one using
|
||||
`--validator-dir` flag), they can follow these steps:
|
||||
using the default (`~/.lighthouse/{testnet}/validators`) `validators` directory (specify a different one using
|
||||
`--validators-dir` flag), they can follow these steps:
|
||||
|
||||
### 1. Run the `lighthouse account validator import` command.
|
||||
|
||||
@ -35,9 +35,11 @@ section, all other users can use:
|
||||
|
||||
|
||||
```bash
|
||||
lighthouse account validator import --directory validator_keys
|
||||
lighthouse --testnet medalla account validator import --directory validator_keys
|
||||
```
|
||||
|
||||
Note: The user must specify the testnet that they are importing the keys for using the `--testnet` flag.
|
||||
|
||||
|
||||
After which they will be prompted for a password for each keystore discovered:
|
||||
|
||||
|
@ -57,11 +57,11 @@ OPTIONS:
|
||||
|
||||
## Example
|
||||
|
||||
Creates a new wallet named `wally` with a randomly generated password saved
|
||||
Creates a new wallet named `wally` and saves it in `~/.lighthouse/medalla/wallets` with a randomly generated password saved
|
||||
to `./wallet.pass`:
|
||||
|
||||
```bash
|
||||
lighthouse account wallet create --name wally --password-file wally.pass
|
||||
lighthouse --testnet medalla account wallet create --name wally --password-file wally.pass
|
||||
```
|
||||
|
||||
> Notes:
|
||||
|
@ -91,9 +91,9 @@ fn main() {
|
||||
.value_name("DIR")
|
||||
.global(true)
|
||||
.help(
|
||||
"Root data directory for lighthouse keys and databases. \
|
||||
Defaults to $HOME/.lighthouse/{default-testnet}, \
|
||||
currently, $HOME/.lighthouse/medalla")
|
||||
"Used to specify a custom root data directory for lighthouse keys and databases. \
|
||||
Defaults to $HOME/.lighthouse/{testnet} where testnet is the value of the `testnet` flag \
|
||||
Note: Users should specify separate custom datadirs for different testnets.")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
|
Loading…
Reference in New Issue
Block a user