10000 Refactor cluster_info module to reduce complexity of the code · Issue #5824 · anza-xyz/agave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor cluster_info module to reduce complexity of the code #5824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KirillLykov opened this issue Apr 15, 2025 · 2 comments
Open

Refactor cluster_info module to reduce complexity of the code #5824

KirillLykov opened this issue Apr 15, 2025 · 2 comments
Labels
good first issue Good for newcomers

Comments

@KirillLykov
Copy link
KirillLykov commented Apr 15, 2025

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,
}
@KirillLykov
Copy link
Author
KirillLykov commented Apr 15, 2025

@alexpyattaev Created an issue while looking into it. Might be a good starting issue for a new comer.

@alexpyattaev
Copy link

struct Sockets is definitely on their way towards net-utils so we can have all socket binding related code in more or less one place. It can be neatly split off from Node initialization. PR for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants
0