lighthouse/book/src/validator-manager.md
Paul Hauner 1373dcf076 Add validator-manager (#3502)
## Issue Addressed

Addresses #2557

## Proposed Changes

Adds the `lighthouse validator-manager` command, which provides:

- `lighthouse validator-manager create`
    - Creates a `validators.json` file and a `deposits.json` (same format as https://github.com/ethereum/staking-deposit-cli)
- `lighthouse validator-manager import`
    - Imports validators from a `validators.json` file to the VC via the HTTP API.
- `lighthouse validator-manager move`
    - Moves validators from one VC to the other, utilizing only the VC API.

## Additional Info

In 98bcb947c I've reduced some VC `ERRO` and `CRIT` warnings to `WARN` or `DEBG` for the case where a pubkey is missing from the validator store. These were being triggered when we removed a validator but still had it in caches. It seems to me that `UnknownPubkey` will only happen in the case where we've removed a validator, so downgrading the logs is prudent. All the logs are `DEBG` apart from attestations and blocks which are `WARN`. I thought having *some* logging about this condition might help us down the track.

In 856cd7e37d I've made the VC delete the corresponding password file when it's deleting a keystore. This seemed like nice hygiene. Notably, it'll only delete that password file after it scans the validator definitions and finds that no other validator is also using that password file.
2023-08-08 00:03:22 +00:00

1.7 KiB

Validator Manager

Introduction

The lighthouse validator-manager tool provides utilities for managing validators on a running Lighthouse Validator Client. The validator manager performs operations via the HTTP API of the validator client (VC). Due to limitations of the keymanager-APIs, only Lighthouse VCs are fully supported by this command.

The validator manager tool is similar to the lighthouse account-manager tool, except the latter creates files that will be read by the VC next time it starts whilst the former makes instant changes to a live VC.

The account-manager is ideal for importing keys created with the staking-deposit-cli. On the other hand, the validator-manager is ideal for moving existing validators between two VCs or for advanced users to create validators at scale with less downtime.

The validator-manager boasts the following features:

  • One-line command to arbitrarily move validators between two VCs, maintaining the slashing protection database.
  • Generates deposit files compatible with the Ethereum Staking Launchpad.
  • Generally involves zero or very little downtime.
  • The "key cache" is preserved whenever a validator is added with the validator manager, preventing long waits at start up when a new validator is added.

Guides