From a815075115b186bc70d34b1b10c34680ea6cd1a7 Mon Sep 17 00:00:00 2001 From: yslcrypto Date: Sat, 7 Nov 2020 15:14:08 +0100 Subject: [PATCH] book edits up to page 9 --- docs/the_nimbus_book/src/SUMMARY.md | 2 +- docs/the_nimbus_book/src/deposit.md | 7 +++-- docs/the_nimbus_book/src/eth1.md | 33 ++++++++++++++++++++ docs/the_nimbus_book/src/start-syncing.md | 37 +++++++++++++++++++++-- 4 files changed, 73 insertions(+), 6 deletions(-) create mode 100644 docs/the_nimbus_book/src/eth1.md diff --git a/docs/the_nimbus_book/src/SUMMARY.md b/docs/the_nimbus_book/src/SUMMARY.md index 873058070..101cabbb3 100644 --- a/docs/the_nimbus_book/src/SUMMARY.md +++ b/docs/the_nimbus_book/src/SUMMARY.md @@ -3,7 +3,7 @@ - [Hardware requirements]() - [Install dependencies](./install.md) - [Build the beacon node](./build.md) -- [Sync an eth1 node]() +- [Run an eth1 node](./eth1.md) - [Sync the beacon node](./start-syncing.md) - [Make a deposit](./deposit.md) - [Manage your keys](./keys.md) diff --git a/docs/the_nimbus_book/src/deposit.md b/docs/the_nimbus_book/src/deposit.md index 43b9b644b..a2f996ee2 100644 --- a/docs/the_nimbus_book/src/deposit.md +++ b/docs/the_nimbus_book/src/deposit.md @@ -25,7 +25,9 @@ In the `Select Client` section you'll first be asked to choose an eth1 client. Y ![](https://i.imgur.com/l5WSGqZ.png) -We recommend you choose `Go Ethereum` (or `Geth`). +We recommend you choose `Go Ethereum` (or `Geth`). + +*If you've followed the book up to this point, you should already have geth up and running.* ## 2. Block explorer Once you've sent off your transaction, you should see the following screen. @@ -43,4 +45,5 @@ It's a good idea to bookmark this page. ## Expected waiting time (the queue) Once you send off your transaction(s), your validator will be put in a queue based on deposit time. Getting through the queue may take a few hours or days (assuming the chain is finalising). No validators are accepted into the validator set while the chain isn't finalising. -> **Note:** If you are making a mainnet deposit this is all you need to do at this stage. If you haven't done so already, we recommend you make a testnet deposit too, and continue with the rest of the book. This will give you a chance to play around with Nimbus in a risk-free environment. +*If you've made a mainnet deposit, your validator will be activated when mainnet launches, regardless of how many deposits are made before then: this will in all likelihood be **Dec 1st 2020, 12pm UTC*** + diff --git a/docs/the_nimbus_book/src/eth1.md b/docs/the_nimbus_book/src/eth1.md new file mode 100644 index 000000000..eb45e0058 --- /dev/null +++ b/docs/the_nimbus_book/src/eth1.md @@ -0,0 +1,33 @@ +## Run an eth1 node + +In order to process incoming validator deposits from the eth1 chain, you'll need to run an eth1 client in parallel to your eth2 client. While it is possible to use a third-party service like [Infura](./infura-guide.md), we recommend running your own client in order to ensure the network stays as decentralised as possible. + +In a sentence, validators are responsible for including new deposits when they propose blocks. An eth1 client is needed to ensure your validator performs this task correctly. + +On this page we provide instructions for using Geth (however, any reputable eth1 client should do the trick). + +### Install Geth +If you're running MacOS, follow the instructions [listed here](https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Mac) to install geth. Otherwise [see here](https://github.com/ethereum/go-ethereum/wiki/Installing-Geth). + +### Start Geth + +Once you have geth installed, use the following command to start your eth1 node: + +**Testnet** +``` +geth --goerli --ws +``` + +**Mainnet** +``` +geth --ws +``` + +>**Note:** The `--ws` flag is needed to enable the websocket RPC API. This allows Nimbus to query the eth1 chain using Web3 API calls. + + +### Leave Geth running + +Let it sync - Geth uses a fast sync mode by default. It shouldn't take longer than a few hours. + + diff --git a/docs/the_nimbus_book/src/start-syncing.md b/docs/the_nimbus_book/src/start-syncing.md index 4ebd303fd..d9b7bf7bf 100644 --- a/docs/the_nimbus_book/src/start-syncing.md +++ b/docs/the_nimbus_book/src/start-syncing.md @@ -1,20 +1,51 @@ # Start syncing -> **Note:** Mainnet won't launch before December 1st. If you're planning on making a mainnet [deposit](./deposit.md) you can safely skip this step. - If you're joining a network that has already launched, you need to ensure that your beacon node is [completely synced](./keep-an-eye.md#keep-track-of-your-syncing-progress) before submitting your deposit. This is particularly important if you are joining a network that's been running for a while. +### Testnet -To start syncing `medalla` , from the `nimbus-eth2` repository, run: +To start syncing the `medalla` testnet , from the `nimbus-eth2` repository, run: ``` make medalla ``` +### Mainnet + +> **Note:** Mainnet won't launch before December 1st. +To start monitoring the eth1 mainnet chain for deposits, from the `nimbus-eth2` repository, run: +``` + ./run-mainnet-beacon-node.sh +``` + +You should see the following prompt: + +``` +To monitor the Eth1 validator deposit contract, you'll need to pair +the Nimbus beacon node with a Web3 provider capable of serving Eth1 +event logs. This could be a locally running Eth1 client such as Geth +or a cloud service such as Infura. For more information please see +our setup guide: + +https://status-im.github.io/nimbus-eth2/eth1.html + +Please enter a Web3 provider URL: +``` + +If you're running a local geth instance, geth accepts connections from the loopback interface (`127.0.0.1`), with default WebSocket port `8546`. This means that your default Web3 provider URL should be: +``` +ws://127.0.0.1:8546 +``` +Enter it, you should see the following output: + +``` +INF 2020-11-07 13:59:31.199+01:00 Generating a random Peer ID to protect your privacy topics="networking" tid=18382613 file=eth2_network.nim:1229 network_public_key=08021221020ee5c1cfbf731405d14f2f382bc4037fbbee2b6ac5511dd51f1d9e28abb1aa62 +INF 2020-11-07 13:59:31.336+01:00 Starting Eth1 deposit contract monitoring tid=18382613 file=mainchain_monitor.nim:783 contract=0x1234567890123456789012345678901234567890 url=web3(ws://127.0.0.1:8546) +```