Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Make NetworkActor generic over NetworkDriver and NetworkHandler #3218

Description

@op-will

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:

  1. Codifying the interface between NetworkActor and NetworkHandler as a trait
  2. Codifying the interface between NetworkActor and NetworkDriver as a trait (this trait will be generic over the new NetworkHandler trait)
  3. Making NetworkActor generic over both
  4. 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>,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions