Anchor pre-PR: Modularize validator store (#6771)

* pass slots_per_epoch at runtime

* remove generic E from unrequired types

* move `validator_store` to `lighthouse_validator_store`

* make validator_store into a trait

* further reduce dependencies

* remove `environment` dependency on `beacon_node_fallback`

* Manually pull in some changes from tracing-integration (thanks sayan!)

Co-authored-by: ThreeHrSleep <threehrsleep@gmail.com>

* remove `environment` from `validator_services`

* unify boost factor accessors

* add builder for DutiesService

* Manually merge tracing PR for beacon_node_fallback

Co-authored-by: ThreeHrSleep <threehrsleep@gmail.com>

* Fix chain_spec for BlockService

* address review

* remove PhantomData from SyncDutiesMap

* fix tests

* correct test

* Add `E` to `ValidatorStore` as associated type

* fix tests

* derive Clone for ValidatorStore's Error and required sub-errors

* switch to enum for block signing to allow differing types

---------

Co-authored-by: João Oliveira <hello@jxs.pt>
Co-authored-by: ThreeHrSleep <threehrsleep@gmail.com>
Co-authored-by: Jimmy Chen <jimmy@sigmaprime.io>
This commit is contained in:
Daniel Knopik
2025-01-09 13:56:29 +01:00
committed by GitHub
parent 9a4768a771
commit 64eb84800a
46 changed files with 2305 additions and 2195 deletions

45
Cargo.lock generated
View File

@@ -868,15 +868,15 @@ dependencies = [
name = "beacon_node_fallback"
version = "0.1.0"
dependencies = [
"environment",
"eth2",
"futures",
"itertools 0.10.5",
"serde",
"slog",
"slot_clock",
"strum",
"task_executor",
"tokio",
"tracing",
"types",
"validator_metrics",
]
@@ -2250,6 +2250,7 @@ dependencies = [
"task_executor",
"tokio",
"types",
"validator_store",
]
[[package]]
@@ -5357,6 +5358,25 @@ dependencies = [
"void",
]
[[package]]
name = "lighthouse_validator_store"
version = "0.1.0"
dependencies = [
"account_utils",
"doppelganger_service",
"initialized_validators",
"parking_lot 0.12.3",
"serde",
"signing_method",
"slashing_protection",
"slog",
"slot_clock",
"task_executor",
"types",
"validator_metrics",
"validator_store",
]
[[package]]
name = "lighthouse_version"
version = "0.1.0"
@@ -9537,6 +9557,7 @@ dependencies = [
"graffiti_file",
"hyper 1.5.1",
"initialized_validators",
"lighthouse_validator_store",
"metrics",
"monitoring_api",
"parking_lot 0.12.3",
@@ -9592,6 +9613,7 @@ dependencies = [
"graffiti_file",
"initialized_validators",
"itertools 0.10.5",
"lighthouse_validator_store",
"lighthouse_version",
"logging",
"parking_lot 0.12.3",
@@ -9622,6 +9644,7 @@ dependencies = [
name = "validator_http_metrics"
version = "0.1.0"
dependencies = [
"lighthouse_validator_store",
"lighthouse_version",
"malloc_utils",
"metrics",
@@ -9632,7 +9655,6 @@ dependencies = [
"types",
"validator_metrics",
"validator_services",
"validator_store",
"warp",
"warp_utils",
]
@@ -9675,16 +9697,16 @@ version = "0.1.0"
dependencies = [
"beacon_node_fallback",
"bls",
"doppelganger_service",
"environment",
"eth2",
"futures",
"graffiti_file",
"logging",
"parking_lot 0.12.3",
"safe_arith",
"slog",
"slot_clock",
"task_executor",
"tokio",
"tracing",
"tree_hash",
"types",
"validator_metrics",
@@ -9695,18 +9717,8 @@ dependencies = [
name = "validator_store"
version = "0.1.0"
dependencies = [
"account_utils",
"doppelganger_service",
"initialized_validators",
"parking_lot 0.12.3",
"serde",
"signing_method",
"slashing_protection",
"slog",
"slot_clock",
"task_executor",
"types",
"validator_metrics",
]
[[package]]
@@ -9987,6 +9999,7 @@ dependencies = [
"eth2_network_config",
"futures",
"initialized_validators",
"lighthouse_validator_store",
"logging",
"parking_lot 0.12.3",
"reqwest",