* 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>
## Issue Addressed
NA
## Proposed Changes
In #4024 we added metrics to expose the latency measurements from a VC to each BN. Whilst playing with these new metrics on our infra I realised it would be great to have a single metric to make sure that the primary BN for each VC has a reasonable latency. With the current "metrics for all BNs" it's hard to tell which is the primary.
## Additional Info
NA
## Issue Addressed
NA
## Proposed Changes
Adds a service which periodically polls (11s into each mainnet slot) the `node/version` endpoint on each BN and roughly measures the round-trip latency. The latency is exposed as a `DEBG` log and a Prometheus metric.
The `--latency-measurement-service` has been added to the VC, with the following options:
- `--latency-measurement-service true`: enable the service (default).
- `--latency-measurement-service`: (without a value) has the same effect.
- `--latency-measurement-service false`: disable the service.
## Additional Info
Whilst looking at our staking setup, I think the BN+VC latency is contributing to late blocks. Now that we have to wait for the builders to respond it's nice to try and do everything we can to reduce that latency. Having visibility is the first step.