Skip to content

Refactor cluster_info module to reduce complexity of the code #5824

Open
@KirillLykov

Description

@KirillLykov

Problem

cluster_info module has the following problems:

  • too much code in one module -- for example, maybe move Node to it's own file?
  • Node has several constructors which have some differences but I'm sure there is a space for consolidation
  • Sockets structure is flat, so it spits sockets by names. For example, tpu_ and later these fields are used to construct structure TpuSockets. Extract structures with proper construction encapsulation.
  • in new_localhost_with_pubkey_and_quic_endpoints we sometime bind to 0.0.0.0 and sometimes to localhost.
  • Encapsulation -- remove pub from fields:
pub struct Node {
    pub info: ContactInfo,
    pub sockets: Sockets,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions