From 2ede9caaa6069690b60644523d55359389b4b71a Mon Sep 17 00:00:00 2001 From: Age Manning Date: Fri, 31 Jul 2020 02:14:50 +0000 Subject: [PATCH] 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 --- book/src/SUMMARY.md | 2 +- book/src/become-a-validator-docker.md | 12 ++++++++++-- book/src/become-a-validator-source.md | 23 +++++++++++++++++------ book/src/become-a-validator.md | 8 +++++--- book/src/docker.md | 4 +++- book/src/validator-create.md | 13 ++++++++++--- 6 files changed, 46 insertions(+), 16 deletions(-) diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 7edb079e3b..8194b825fc 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -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) diff --git a/book/src/become-a-validator-docker.md b/book/src/become-a-validator-docker.md index 37a91319f6..fd3331b8ab 100644 --- a/book/src/become-a-validator-docker.md +++ b/book/src/become-a-validator-docker.md @@ -47,6 +47,8 @@ VALIDATOR_COUNT=1 VOTING_ETH1_NODE=http://geth:8545 ``` +> To specify a non-default testnet add `TESTNET=` to the above file. 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`). diff --git a/book/src/become-a-validator-source.md b/book/src/become-a-validator-source.md index 0d84f8cdd9..891584331b 100644 --- a/book/src/become-a-validator-source.md +++ b/book/src/become-a-validator-source.md @@ -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. diff --git a/book/src/become-a-validator.md b/book/src/become-a-validator.md index e6e7f88930..bab262343b 100644 --- a/book/src/become-a-validator.md +++ b/book/src/become-a-validator.md @@ -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