mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
Update CLI defaults and book (#999)
This commit is contained in:
@@ -19,8 +19,8 @@ TL;DR isn't adequate.
|
||||
|
||||
```bash
|
||||
lcli new-testnet
|
||||
lcli interop-genesis
|
||||
lighthouse bn --testnet-dir ~/.lighthouse/testnet --dummy-eth1 --http
|
||||
lcli interop-genesis 128
|
||||
lighthouse bn --testnet-dir ~/.lighthouse/testnet --dummy-eth1 --http --enr-match
|
||||
lighthouse vc --testnet-dir ~/.lighthouse/testnet --allow-unsynced testnet insecure 0 128
|
||||
```
|
||||
|
||||
@@ -83,12 +83,13 @@ start a beacon node and validator client.
|
||||
Start a beacon node:
|
||||
|
||||
```bash
|
||||
lighthouse bn --testnet-dir ~/.lighthouse/testnet --dummy-eth1 --http
|
||||
lighthouse bn --testnet-dir ~/.lighthouse/testnet --dummy-eth1 --http --enr-match
|
||||
```
|
||||
|
||||
> - `--testnet-dir` instructs the beacon node to use the spec we generated earlier.
|
||||
> - `--dummy-eth1` uses deterministic "junk data" for linking to the eth1 chain, avoiding the requirement for an eth1 node. The downside is that new validators cannot be on-boarded after genesis.
|
||||
> - `--http` starts the REST API so the validator client can produce blocks.
|
||||
> - `--enr-match` sets the local ENR to use the local IP address and port which allows other nodes to connect. This node can then behave as a bootnode for other nodes.
|
||||
|
||||
### 2.2 Start a validator client
|
||||
|
||||
@@ -104,3 +105,37 @@ lighthouse vc --testnet-dir ~/.lighthouse/testnet --allow-unsynced testnet insec
|
||||
> - `testnet insecure 0 128` instructs the validator client to use insecure
|
||||
> testnet private keys and that it should control validators from `0` to
|
||||
> `127` (inclusive).
|
||||
|
||||
## 3. Connect other nodes
|
||||
|
||||
Other nodes can now join this local testnet.
|
||||
|
||||
The initial node will output the ENR on boot. The ENR can also be obtained via
|
||||
the http:
|
||||
```bash
|
||||
curl localhost:5052/network/enr
|
||||
```
|
||||
or from it's default directory:
|
||||
```
|
||||
~/.lighthouse/beacon/network/enr.dat
|
||||
```
|
||||
|
||||
Once the ENR of the first node is obtained, another nodes may connect and
|
||||
participate in the local network. Simply run:
|
||||
|
||||
```bash
|
||||
lighthouse bn --testnet-dir ~/.lighthouse/testnet --dummy-eth1 --http --http-port 5053 --port 9002 --boot-nodes <ENR>
|
||||
```
|
||||
|
||||
> - `--testnet-dir` instructs the beacon node to use the spec we generated earlier.
|
||||
> - `--dummy-eth1` uses deterministic "junk data" for linking to the eth1 chain, avoiding the requirement for an eth1 node. The downside is that new validators cannot be on-boarded after genesis.
|
||||
> - `--http` starts the REST API so the validator client can produce blocks.
|
||||
> - `--http-port` sets the REST API port to a non-standard port to avoid conflicts with the first local node.
|
||||
> - `--port` sets the ports of the lighthouse client to a non-standard value to avoid conflicts with the original node.
|
||||
> - `--boot-nodes` provides the ENR of the original node to connect to. Note all nodes can use this ENR and should discover each other automatically via the discv5 discovery.
|
||||
|
||||
Note: The `--enr-match` is only required for the boot node. The local ENR of
|
||||
all subsequent nodes will update automatically.
|
||||
|
||||
|
||||
This node should now connect to the original node, sync and follow it's head.
|
||||
|
||||
Reference in New Issue
Block a user