Skip to content

Commit

Permalink
Add information about adding validators without restarting. (Consensy…
Browse files Browse the repository at this point in the history
…s#258)

* Add  CLI option to disable built-in slashing protection for external signers.

Signed-off-by: Byron Gravenorst <[email protected]>

* Add instructions to connect to mainnet.

Signed-off-by: Byron Gravenorst <[email protected]>

* updating submodule to latest

* Add instructions to connect to mainnet.

Signed-off-by: Byron Gravenorst <[email protected]>

* Fix markdown issue.

Signed-off-by: Byron Gravenorst <[email protected]>

* Add information about adding validators without restarting.

Signed-off-by: Byron Gravenorst <[email protected]>

* Fix markdown issue.

Signed-off-by: Byron Gravenorst <[email protected]>

* Address reviewer feedback.

Signed-off-by: Byron Gravenorst <[email protected]>
  • Loading branch information
bgravenorst authored Mar 2, 2021
1 parent 21e5104 commit 5f387ae
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 12 deletions.
31 changes: 31 additions & 0 deletions docs/HowTo/Load-Validators-No-Restart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
description: How to load validators without restarting Teku
---

# Load validators without restarting Teku

You can load validators into a running Teku process, only if you started Teku by:

* Specifying a directory using [`--validator-keys`](../Reference/CLI/CLI-Syntax.md#validator-keys), or
* Specifying a URL using [`--validators-external-signer-public-keys`](../Reference/CLI/CLI-Syntax.md#validators-external-signer-public-keys).

!!! important

* If you started Teku by specifying individual validator key files or external signer public keys,
then you must restart Teku.

* You must restart Teku to remove validators.

**Prerequisites:**

* Add the new validators to the directory specified in [`--validator-keys`](../Reference/CLI/CLI-Syntax.md#validator-keys),
or ensure the URL supplied in [`--validators-external-signer-public-keys`](../Reference/CLI/CLI-Syntax.md#validators-external-signer-public-keys)
contains the new public keys.

To load the validators in a running Teku instance, send a `SIGHUP` signal to the Teku process.

```bash
kill -HUP <PID>
```

Where `<PID>` is the process ID of the running Teku instance.
33 changes: 21 additions & 12 deletions docs/Reference/CLI/CLI-Syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -782,11 +782,11 @@ to a YAML configuration file. The default is `mainnet`.

Possible values are:

| Network | Chain | Type | Description |
|-----------|---------|-------------|---------------------------------------------------------------------|
| `mainnet` | Eth 2.0 | Production | Main network. |
| `minimal` | Eth 2.0 | Test | Used for local testing and development networks. |
| `pyrmont` | Eth 2.0 | Test | Multi-client testnet. |
| Network | Chain | Type | Description |
|:----------|:--------|:-----------|:-------------------------------------------------|
| `mainnet` | Eth 2.0 | Production | Main network. |
| `minimal` | Eth 2.0 | Test | Used for local testing and development networks. |
| `pyrmont` | Eth 2.0 | Test | Multi-client testnet. |

Predefined networks can provide defaults such the initial state of the network,
bootnodes, and the address of the Ethereum 1.0 deposit contract.
Expand Down Expand Up @@ -1400,6 +1400,11 @@ extension.
When specifying directories, Teku expects to find identically named
keystore and password files. For example `validator_217179e.json` and `validator_217179e.txt`.

!!! tip

You can [load new validators without restarting Teku] if you specify a directory from which
to load the keystore files.

When specifying file names, Teku expects that the files exist.

!!! note
Expand Down Expand Up @@ -1493,16 +1498,19 @@ Password file used to decrypt the keystore.

List or URL of validator public keys used by an external signer (for example, Web3Signer).

!!! tip
Use the URL of the external signer's [`/publicKeys` endpoint](https://consensys.github.io/web3signer/web3signer-eth2.html#tag/Public-Key)
to load the public keys of all registered validators. For example:

```bash
--validators-external-signer-public-keys=http://localhost:9000/api/v1/eth2/publicKeys
```

Use the URL of the external signer's [`/publicKeys` endpoint](https://consensys.github.io/web3signer/web3signer-eth2.html#tag/Public-Key)
to load the public keys of all registered validators. For example:
!!! tip

```bash
--validators-external-signer-public-keys=http://localhost:9000/api/v1/eth2/publicKeys
```
You can [load new validators without restarting Teku] if you specify a URL from which
to load the public keys.

Ensure the external signer is running before starting Teku.
Ensure the external signer is running before starting Teku.

### validators-external-signer-slashing-protection-enabled

Expand Down Expand Up @@ -1800,3 +1808,4 @@ or clear your weak subjectivity settings.
[slashing protection]: ../../Concepts/Slashing-Protection.md
[weak subjectivity period]: ../../Concepts/Weak-Subjectivity.md
[BeaconScan chain explorer]: https://beaconscan.com/ws_checkpoint
[load new validators without restarting Teku]: ../../HowTo/Load-Validators-No-Restart.md
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ nav:
- Connect to a testnet: HowTo/Get-Started/Connect/Connect-To-Testnet.md
- External signing:
- Use an external signer: HowTo/External-Signer/Use-External-Signer.md
- Load validators without restarting: HowTo/Load-Validators-No-Restart.md
- Monitor Nodes:
- Use metrics: HowTo/Monitor/Metrics.md
- Configure logging: HowTo/Monitor/Logging.md
Expand Down

0 comments on commit 5f387ae

Please sign in to comment.