mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-24 20:47:17 +00:00
e961ff60b4
## 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.
61 lines
2.1 KiB
TOML
61 lines
2.1 KiB
TOML
[package]
|
|
name = "validator_client"
|
|
version = "0.3.5"
|
|
authors = ["Paul Hauner <paul@paulhauner.com>", "Age Manning <Age@AgeManning.com>", "Luke Anderson <luke@lukeanderson.com.au>"]
|
|
edition = "2018"
|
|
|
|
[lib]
|
|
name = "validator_client"
|
|
path = "src/lib.rs"
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "1.14.0", features = ["time", "rt-multi-thread", "macros"] }
|
|
logging = { path = "../common/logging" }
|
|
|
|
[dependencies]
|
|
tree_hash = "0.4.1"
|
|
clap = "2.33.3"
|
|
slashing_protection = { path = "./slashing_protection" }
|
|
slot_clock = { path = "../common/slot_clock" }
|
|
types = { path = "../consensus/types" }
|
|
safe_arith = { path = "../consensus/safe_arith" }
|
|
serde = "1.0.116"
|
|
serde_derive = "1.0.116"
|
|
bincode = "1.3.1"
|
|
serde_json = "1.0.58"
|
|
slog = { version = "2.5.2", features = ["max_level_trace", "release_max_level_trace"] }
|
|
tokio = { version = "1.14.0", features = ["time"] }
|
|
futures = "0.3.7"
|
|
dirs = "3.0.1"
|
|
directory = { path = "../common/directory" }
|
|
lockfile = { path = "../common/lockfile" }
|
|
environment = { path = "../lighthouse/environment" }
|
|
parking_lot = "0.11.0"
|
|
exit-future = "0.2.0"
|
|
filesystem = { path = "../common/filesystem" }
|
|
hex = "0.4.2"
|
|
deposit_contract = { path = "../common/deposit_contract" }
|
|
bls = { path = "../crypto/bls" }
|
|
eth2 = { path = "../common/eth2" }
|
|
tempfile = "3.1.0"
|
|
validator_dir = { path = "../common/validator_dir" }
|
|
clap_utils = { path = "../common/clap_utils" }
|
|
eth2_keystore = { path = "../crypto/eth2_keystore" }
|
|
account_utils = { path = "../common/account_utils" }
|
|
lighthouse_version = { path = "../common/lighthouse_version" }
|
|
warp_utils = { path = "../common/warp_utils" }
|
|
warp = "0.3.2"
|
|
hyper = "0.14.4"
|
|
eth2_serde_utils = "0.1.1"
|
|
libsecp256k1 = "0.6.0"
|
|
ring = "0.16.19"
|
|
rand = { version = "0.7.3", features = ["small_rng"] }
|
|
lighthouse_metrics = { path = "../common/lighthouse_metrics" }
|
|
lazy_static = "1.4.0"
|
|
itertools = "0.10.0"
|
|
monitoring_api = { path = "../common/monitoring_api" }
|
|
sensitive_url = { path = "../common/sensitive_url" }
|
|
task_executor = { path = "../common/task_executor" }
|
|
reqwest = { version = "0.11.0", features = ["json","stream"] }
|
|
url = "2.2.2"
|