lighthouse/lcli/src
Paul Hauner 6ea3bc5e52 Implement VC API (#1657)
## Issue Addressed

NA

## Proposed Changes

- Implements a HTTP API for the validator client.
- Creates EIP-2335 keystores with an empty `description` field, instead of a missing `description` field. Adds option to set name.
- Be more graceful with setups without any validators (yet)
    - Remove an error log when there are no validators.
    - Create the `validator` dir if it doesn't exist.
- Allow building a `ValidatorDir` without a withdrawal keystore (required for the API method where we only post a voting keystore).
- Add optional `description` field to `validator_definitions.yml`

## TODO

- [x] Signature header, as per https://github.com/sigp/lighthouse/issues/1269#issuecomment-649879855
- [x] Return validator descriptions
- [x] Return deposit data
- [x] Respect the mnemonic offset
- [x] Check that mnemonic can derive returned keys
- [x] Be strict about non-localhost
- [x] Allow graceful start without any validators (+ create validator dir)
- [x] Docs final pass
- [x] Swap to EIP-2335 description field. 
- [x] Fix Zerioze TODO in VC api types.
- [x] Zeroize secp256k1 key

## Endpoints

- [x] `GET /lighthouse/version`
- [x] `GET /lighthouse/health`
- [x] `GET /lighthouse/validators` 
- [x] `POST /lighthouse/validators/hd`
- [x] `POST /lighthouse/validators/keystore`
- [x] `PATCH /lighthouse/validators/:validator_pubkey`
- [ ] ~~`POST /lighthouse/validators/:validator_pubkey/exit/:epoch`~~ Future works


## Additional Info

TBC
2020-10-02 09:42:19 +00:00
..
change_genesis_time.rs Optimizations, disable val client sync check & additional lcli tools (#834) 2020-02-04 12:43:04 +11:00
check_deposit_data.rs Update testnet tooling (#1001) 2020-04-19 02:20:43 +00:00
deploy_deposit_contract.rs Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
eth1_genesis.rs Directory restructure (#1532) 2020-10-01 11:12:35 +10:00
generate_bootnode_enr.rs Fix EnrForkId computation (#1441) 2020-08-06 04:29:15 +00:00
helpers.rs Protect against OOB offset in variable list SSZ decoding (#974) 2020-04-20 15:35:47 +10:00
insecure_validators.rs Implement VC API (#1657) 2020-10-02 09:42:19 +00:00
interop_genesis.rs Directory restructure (#1532) 2020-10-01 11:12:35 +10:00
main.rs conforming to the p2p specs, requiring error_messages to be bound (#1593) 2020-09-07 06:47:05 +00:00
new_testnet.rs Directory restructure (#1532) 2020-10-01 11:12:35 +10:00
parse_hex.rs Fix Schlesi-splitting penalty bug (#1166) 2020-05-19 13:49:23 +10:00
parse_ssz.rs Protect against OOB offset in variable list SSZ decoding (#974) 2020-04-20 15:35:47 +10:00
refund_deposit_contract.rs Stable futures (#879) 2020-05-17 11:16:48 +00:00
skip_slots.rs Fix Schlesi-splitting penalty bug (#1166) 2020-05-19 13:49:23 +10:00
transition_blocks.rs Fix Schlesi-splitting penalty bug (#1166) 2020-05-19 13:49:23 +10:00