You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NetworkActor is tightly coupled to NetworkDriver/NetworkHandler. The goal of this task is to decouple them. There may be a better way, but this probably entails:
Codifying the interface between NetworkActor and NetworkHandler as a trait
Codifying the interface between NetworkActor and NetworkDriver as a trait (this trait will be generic over the new NetworkHandler trait)
Making NetworkActor generic over both
Injecting the NetworkDriver trait into NetworkActor
It is also very possible that some or all of NetworkHandler should be consolidated into NetworkActor. Good candidates for consolidation are the following, but it is possible that gossip and discovery also belong:
/// The receiver for the ENRs.
pub enr_receiver: mpsc::Receiver<Enr>,
/// The sender for the unsafe block signer.
pub unsafe_block_signer_sender: watch::Sender<Address>,
/// The peer score inspector. Is used to ban peers that are below a given threshold.
pub peer_score_inspector: tokio::time::Interval,
/// A handler for the block signer.
pub signer: Option<BlockSignerHandler>,
NetworkActoris tightly coupled toNetworkDriver/NetworkHandler. The goal of this task is to decouple them. There may be a better way, but this probably entails:NetworkActorandNetworkHandleras a traitNetworkActorandNetworkDriveras a trait (this trait will be generic over the newNetworkHandlertrait)NetworkActorgeneric over bothNetworkDrivertrait intoNetworkActorIt is also very possible that some or all of
NetworkHandlershould be consolidated intoNetworkActor. Good candidates for consolidation are the following, but it is possible thatgossipanddiscoveryalso belong: