mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
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:
@@ -16,7 +16,7 @@ use super::{
|
||||
Signature, SignedRoot,
|
||||
};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum Error {
|
||||
SszTypesError(ssz_types::Error),
|
||||
AlreadySigned(usize),
|
||||
|
||||
@@ -84,6 +84,7 @@ pub trait AbstractExecPayload<E: EthSpec>:
|
||||
+ TryInto<Self::Capella>
|
||||
+ TryInto<Self::Deneb>
|
||||
+ TryInto<Self::Electra>
|
||||
+ Sync
|
||||
{
|
||||
type Ref<'a>: ExecPayload<E>
|
||||
+ Copy
|
||||
@@ -95,19 +96,23 @@ pub trait AbstractExecPayload<E: EthSpec>:
|
||||
type Bellatrix: OwnedExecPayload<E>
|
||||
+ Into<Self>
|
||||
+ for<'a> From<Cow<'a, ExecutionPayloadBellatrix<E>>>
|
||||
+ TryFrom<ExecutionPayloadHeaderBellatrix<E>>;
|
||||
+ TryFrom<ExecutionPayloadHeaderBellatrix<E>>
|
||||
+ Sync;
|
||||
type Capella: OwnedExecPayload<E>
|
||||
+ Into<Self>
|
||||
+ for<'a> From<Cow<'a, ExecutionPayloadCapella<E>>>
|
||||
+ TryFrom<ExecutionPayloadHeaderCapella<E>>;
|
||||
+ TryFrom<ExecutionPayloadHeaderCapella<E>>
|
||||
+ Sync;
|
||||
type Deneb: OwnedExecPayload<E>
|
||||
+ Into<Self>
|
||||
+ for<'a> From<Cow<'a, ExecutionPayloadDeneb<E>>>
|
||||
+ TryFrom<ExecutionPayloadHeaderDeneb<E>>;
|
||||
+ TryFrom<ExecutionPayloadHeaderDeneb<E>>
|
||||
+ Sync;
|
||||
type Electra: OwnedExecPayload<E>
|
||||
+ Into<Self>
|
||||
+ for<'a> From<Cow<'a, ExecutionPayloadElectra<E>>>
|
||||
+ TryFrom<ExecutionPayloadHeaderElectra<E>>;
|
||||
+ TryFrom<ExecutionPayloadHeaderElectra<E>>
|
||||
+ Sync;
|
||||
}
|
||||
|
||||
#[superstruct(
|
||||
|
||||
Reference in New Issue
Block a user