lighthouse/consensus
Michael Sproul e961ff60b4 Implement standard keystore API (#2736)
## Issue Addressed

Implements the standard key manager API from https://ethereum.github.io/keymanager-APIs/, formerly https://github.com/ethereum/beacon-APIs/pull/151
Related to https://github.com/sigp/lighthouse/issues/2557

## Proposed Changes

- [x] Add all of the new endpoints from the standard API: GET, POST and DELETE.
- [x] Add a `validators.enabled` column to the slashing protection database to support atomic disable + export.
- [x] Add tests for all the common sequential accesses of the API
- [x] Add tests for interactions with remote signer validators
- [x] Add end-to-end tests for migration of validators from one VC to another
- [x] Implement the authentication scheme from the standard (token bearer auth)

## Additional Info

The `enabled` column in the validators SQL database is necessary to prevent a race condition when exporting slashing protection data. Without the slashing protection database having a way of knowing that a key has been disabled, a concurrent request to sign a message could insert a new record into the database. The `delete_concurrent_with_signing` test exercises this code path, and was indeed failing before the `enabled` column was added.

The validator client authentication has been modified from basic auth to bearer auth, with basic auth preserved for backwards compatibility.
2022-01-30 23:22:04 +00:00
..
cached_tree_hash 1.57.0 lints (#2850) 2021-12-03 04:44:30 +00:00
fork_choice Update to superstruct v0.4.1 (#2886) 2022-01-06 03:14:58 +00:00
int_to_bytes Update to tokio 1.1 (#2172) 2021-02-10 23:29:49 +00:00
merkle_proof Get arbitrary check passing (2.0) (#2710) 2021-10-14 02:58:11 +00:00
proto_array v1.1.6 Fork Choice changes (#2822) 2021-12-13 20:43:22 +00:00
safe_arith Remove saturating arith from state_processing (#1644) 2020-09-25 05:18:21 +00:00
serde_utils Implement standard keystore API (#2736) 2022-01-30 23:22:04 +00:00
ssz 1.57.0 lints (#2850) 2021-12-03 04:44:30 +00:00
ssz_derive Implement SSZ union type (#2579) 2021-09-25 05:58:36 +00:00
ssz_types Lazy hashing for SignedBeaconBlock in sync (#2916) 2022-01-14 07:20:54 +00:00
state_processing Implement API for block rewards (#2628) 2022-01-27 01:06:02 +00:00
swap_or_not_shuffle Get arbitrary check passing (2.0) (#2710) 2021-10-14 02:58:11 +00:00
tree_hash Bump crate versions (#2829) 2021-12-02 14:29:57 +11:00
tree_hash_derive Implement SSZ union type (#2579) 2021-09-25 05:58:36 +00:00
types Native support for Gnosis Beacon Chain network (#2931) 2022-01-27 22:58:33 +00:00