Book modifications to include testnet param (#1418)
## Issue Addressed N/A ## Proposed Changes Update the lighthouse book to accommodate the new `--testnet` CLI param. ## Additional Info
This commit is contained in:
parent
a37e75f44b
commit
2ede9caaa6
@ -1,7 +1,7 @@
|
||||
# Summary
|
||||
|
||||
* [Introduction](./intro.md)
|
||||
* [Become a Medalla Validator](./become-a-validator.md)
|
||||
* [Become a Validator](./become-a-validator.md)
|
||||
* [Using Docker](./become-a-validator-docker.md)
|
||||
* [Building from Source](./become-a-validator-source.md)
|
||||
* [Installation](./installation.md)
|
||||
|
@ -47,6 +47,8 @@ VALIDATOR_COUNT=1
|
||||
VOTING_ETH1_NODE=http://geth:8545
|
||||
```
|
||||
|
||||
> To specify a non-default testnet add `TESTNET=<testnet>` to the above file. <testnet> can be `altona` or `medalla`.
|
||||
|
||||
_This `.env` file should live in the `lighthouse-docker` directory alongside the
|
||||
`docker-compose.yml` file_.
|
||||
|
||||
@ -68,13 +70,19 @@ validator_client_1 | Jun 01 00:29:24.418 INFO Decrypted validator keystore
|
||||
```
|
||||
This is one of the earlier logs outputted, so you may have to scroll up or perform a search in your terminal to find it.
|
||||
|
||||
> Note: `docker-compose up` generates a new sub-directory -- to store your validator's deposit data, along with its voting and withdrawal keys -- in the `.lighthouse/validators` directory. This sub-directory is identified by your validator's `voting_pubkey` (the same `voting_pubkey` you see in the logs). So this is another way you can find it.
|
||||
> Note: `docker-compose up` generates a new sub-directory -- to store your validator's deposit data, along with its voting and withdrawal keys -- in the `lighthouse-data/validators` directory. This sub-directory is identified by your validator's `voting_pubkey` (the same `voting_pubkey` you see in the logs). So this is another way you can find it.
|
||||
|
||||
> Note: the docker-compose setup includes a fast-synced geth node. So you can
|
||||
> expect the `beacon_node` to log some eth1-related errors whilst the geth node
|
||||
> boots and becomes synced. This will only happen on the first start of the
|
||||
> compose environment or if geth loses sync.
|
||||
|
||||
> Note: If you are participating in the genesis of a network (the network has
|
||||
> not launched yet) you will notice errors in the validator client. This is
|
||||
> because the beacon node not expose its HTTP API until
|
||||
> the genesis of the network is known (approx 2 days before the network
|
||||
> launches).
|
||||
|
||||
To find an estimate for how long your beacon node will take to finish syncing, look for logs that look like this:
|
||||
|
||||
```bash
|
||||
@ -96,7 +104,7 @@ However, since it generally takes somewhere between [4 and 8 hours](./faq.md) af
|
||||
|
||||
## Installation complete!
|
||||
|
||||
In the [next step](become-a-validator.html#2-submit-your-deposit-to-goerli) you'll need to upload your validator's deposit data. This data is stored in a file called `eth1_deposit_data.rlp`.
|
||||
In the [next step](become-a-validator.html#2-submit-your-deposit-to-goerli) you'll need to upload your validator's deposit data. This data is stored in a file called `eth1_deposit_data.rlp`.
|
||||
|
||||
You'll find it in `lighthouse-docker/.lighthouse/validators/` -- in the sub-directory that corresponds to your validator's public key (`voting_pubkey`).
|
||||
|
||||
|
@ -45,9 +45,14 @@ the internet and maintains a view of the chain.
|
||||
Start your beacon node with:
|
||||
|
||||
```bash
|
||||
lighthouse beacon --eth1 --http
|
||||
lighthouse --testnet medalla beacon --eth1 --http
|
||||
```
|
||||
|
||||
> The `--testnet` parameter is optional. Omitting it will default to the
|
||||
> current public testnet. Set the value to the testnet you wish to run on.
|
||||
> Current values are either `altona` or `medalla`. This is true for all the
|
||||
> following commands in this document.
|
||||
|
||||
>Note: the `--http` flag enables the HTTP API for the validator client. And the `--eth1` flag tells the beacon node that it should sync with an Ethereum1 node (e.g. Geth). These flags are only required if you wish to run a validator.
|
||||
|
||||
|
||||
@ -81,7 +86,7 @@ validator](./validator-create.md). A two-step example follows:
|
||||
Create a wallet with:
|
||||
|
||||
```bash
|
||||
lighthouse account wallet create --name my-validators --passphrase-file my-validators.pass
|
||||
lighthouse --testnet medalla account wallet create --name my-validators --passphrase-file my-validators.pass
|
||||
```
|
||||
|
||||
The output will look like this:
|
||||
@ -117,7 +122,7 @@ used to restore your validator if there is a data loss.
|
||||
Create a validator from the wallet with:
|
||||
|
||||
```bash
|
||||
lighthouse account validator create --wallet-name my-validators --wallet-passphrase my-validators.pass --count 1
|
||||
lighthouse --testnet medalla account validator create --wallet-name my-validators --wallet-passphrase my-validators.pass --count 1
|
||||
```
|
||||
|
||||
The output will look like this:
|
||||
@ -140,6 +145,12 @@ information.
|
||||
|
||||
## 5. Start your validator client
|
||||
|
||||
> Note: If you are participating in the genesis of a network (the network has
|
||||
> not launched yet) you should skip this step and re-run this step two days before
|
||||
> the launch of the network. The beacon node does not expose its HTTP API until
|
||||
> the genesis of the network is known (approx 2 days before the network
|
||||
> launches).
|
||||
|
||||
Since the validator client stores private keys and signs messages generated by the beacon node, for security reasons it runs separately from it.
|
||||
|
||||
You'll need both your beacon node _and_ validator client running if you want to
|
||||
@ -148,7 +159,7 @@ stake.
|
||||
Start the validator client with:
|
||||
|
||||
```bash
|
||||
lighthouse validator --auto-register
|
||||
lighthouse --testnet medalla validator --auto-register
|
||||
```
|
||||
|
||||
The `--auto-register` flag registers your signing key with the slashing protection database, which
|
||||
@ -164,7 +175,7 @@ Dec 09 13:09:09.000 INFO Awaiting activation slot: 17787, ..
|
||||
```
|
||||
|
||||
|
||||
To find an estimate for how long your beacon node will take to finish syncing, lookout for the following logs:
|
||||
To find an estimate for how long your beacon node will take to finish syncing, lookout for the following logs:
|
||||
|
||||
```bash
|
||||
beacon_node_1 | Mar 16 11:33:53.979 INFO Syncing
|
||||
@ -186,7 +197,7 @@ However, since it generally takes somewhere between [4 and 8 hours](./faq.md) af
|
||||
|
||||
## Installation complete!
|
||||
|
||||
In the [next step](become-a-validator.html#2-submit-your-deposit-to-goerli) you'll need to upload your validator's deposit data. This data is stored in a file called `eth1_deposit_data.rlp`.
|
||||
In the [next step](become-a-validator.html#2-submit-your-deposit-to-goerli) you'll need to upload your validator's deposit data. This data is stored in a file called `eth1_deposit_data.rlp`.
|
||||
|
||||
You'll find it in `/home/.lighthouse/validators` -- in the sub-directory that corresponds to your validator's public key.
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
# Become an Ethereum 2.0 Testnet Validator on Medalla
|
||||
# Become an Ethereum 2.0 Validator
|
||||
|
||||
Running a Lighthouse validator on the [Medalla](https://github.com/goerli/medalla/tree/master/medalla)
|
||||
multi-client testnet is easy if you're familiar with the terminal.
|
||||
There are two public testnets currently available. [Medalla](https://github.com/goerli/medalla/tree/master/medalla) and [Altona](https://github.com/goerli/medalla/tree/master/altona). Lighthouse supports both out of the box and joining these multi-client testnets is easy if you're familiar with the terminal.
|
||||
|
||||
Lighthouse runs on Linux, MacOS and Windows and has a Docker work-flow to make
|
||||
things as simple as possible.
|
||||
@ -25,6 +24,9 @@ There are two, different ways to install and start a Lighthouse validator:
|
||||
|
||||
Once you've completed **either one** of these steps, you can move onto the next step.
|
||||
|
||||
> Take note when running Lighthouse. Use the --testnet parameter to specify the testnet you whish to participate in. Medalla is currently the default, so make sure to use --testnet altona to join the Altona testnet.
|
||||
|
||||
|
||||
## 2. Submit your deposit to Goerli
|
||||
|
||||
<div class="form-signin" id="uploadDiv">
|
||||
|
@ -49,9 +49,11 @@ $ docker run lighthouse:local lighthouse --help
|
||||
You can run a Docker beacon node with the following command:
|
||||
|
||||
```bash
|
||||
$ docker run -p 9000:9000 -p 127.0.0.1:5052:5052 -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse beacon --http --http-address 0.0.0.0
|
||||
$ docker run -p 9000:9000 -p 127.0.0.1:5052:5052 -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse --testnet medalla beacon --http --http-address 0.0.0.0
|
||||
```
|
||||
|
||||
> To join the altona testnet, use --testnet altona instead.
|
||||
|
||||
> The `-p` and `-v` and values are described below.
|
||||
|
||||
### Volumes
|
||||
|
@ -14,7 +14,7 @@ account validator create` command:
|
||||
```bash
|
||||
lighthouse account validator create --help
|
||||
|
||||
Creates new validators from an existing EIP-2386 wallet using the EIP-2333 HD key-derivation scheme.
|
||||
Creates new validators from an existing EIP-2386 wallet using the EIP-2333 HD key derivation scheme.
|
||||
|
||||
USAGE:
|
||||
lighthouse account_manager validator create [FLAGS] [OPTIONS] --wallet-name <WALLET_NAME> --wallet-passphrase <WALLET_PASSWORD_PATH>
|
||||
@ -34,6 +34,9 @@ OPTIONS:
|
||||
The number of validators to create, regardless of how many already exist
|
||||
|
||||
-d, --datadir <DIR> Data directory for lighthouse keys and databases.
|
||||
--debug-level <LEVEL>
|
||||
The verbosity level for emitting logs. [default: info] [possible values: info, debug, trace, warn, error,
|
||||
crit]
|
||||
--deposit-gwei <DEPOSIT_GWEI>
|
||||
The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator
|
||||
(MAX_EFFECTIVE_BALANCE)
|
||||
@ -43,6 +46,9 @@ OPTIONS:
|
||||
-s, --spec <TITLE>
|
||||
Specifies the default eth2 spec type. [default: mainnet] [possible values: mainnet, minimal, interop]
|
||||
|
||||
--testnet <testnet>
|
||||
Name of network lighthouse will connect to [possible values: medalla, altona]
|
||||
|
||||
-t, --testnet-dir <DIR>
|
||||
Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective
|
||||
if there is no existing database.
|
||||
@ -60,7 +66,7 @@ The example assumes that the `wally` wallet was generated from the
|
||||
[wallet](./wallet-create.md) example.
|
||||
|
||||
```bash
|
||||
lighthouse account wallet validator --name wally --wallet-password wally.pass
|
||||
lighthouse --testnet medalla account validator create --name wally --wallet-passphrase wally.pass --count 1
|
||||
```
|
||||
|
||||
This command will:
|
||||
@ -71,5 +77,6 @@ This command will:
|
||||
- An encrypted keystore containing the validators voting keypair.
|
||||
- An `eth1_deposit_data.rlp` assuming the default deposit amount (`32 ETH`
|
||||
for most testnets and mainnet) which can be submitted to the deposit
|
||||
contract.
|
||||
contract for the medalla testnet. Other testnets can be set via the
|
||||
`--testnet` CLI param.
|
||||
- Store a password to the validators voting keypair in `~/.lighthouse/secrets`.
|
||||
|
Loading…
Reference in New Issue
Block a user