Skip to content
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

Network Census #727

Closed
wants to merge 7 commits into from
Closed

Network Census #727

wants to merge 7 commits into from

Conversation

ScottyPoi
Copy link
Collaborator

This introdueces a new mapping in the RoutingTable class which track the client info from Ping/Pong payloads.

The network census tracks all known nodes in the network, not just nodes in the kademlia routing table, which has bucket size limits.

A new class called ScoredPeer was created for this mapping. The currently implementation of ScoredPeer stores minimal information, but the class could be used in future updates to track different metrics or history.

/**
* Map of all known peers in the network
*/
public networkCensus: Map<string, ScoredPeer>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public networkCensus: Map<string, ScoredPeer>
public networkCensus: Map<NodeId, ScoredPeer>

Import NodeId from @chainsafe/enr

@ScottyPoi
Copy link
Collaborator Author

closing to combine with #726

@ScottyPoi ScottyPoi closed this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants