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

feat(network): add proxied nodes to info endpoint #2818

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

juslesan
Copy link
Contributor

Summary

Added proxied nodes to the to info endpoint

@github-actions github-actions bot added network Related to Network Package dht Related to DHT package labels Oct 16, 2024
@juslesan juslesan requested a review from teogeb October 16, 2024 08:29
super({
createConnectorFacade: () => new SimulatorConnectorFacade(localPeerDescriptor, simulator),
metricsContext: new MetricsContext(),
allowIncomingPrivateConnections: false
allowIncomingPrivateConnections
Copy link
Contributor

Choose a reason for hiding this comment

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

Are private connections and proxy connections the same thing? (Do we plan to use private connections to something else, too?)

E.g. we have this comment in ConnectionManager:

    // Used to filter proxy connections from the connections view
    private remotePrivateConnections: Set<DhtAddress> = new Set()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Proxy connections is a layer2 concept so having a wider conecpt in the lower layer makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also Not all proxy-connections are private connections. Nodes only use privateClientMode when they only have proxy client connections. If there are any streams where the node participates in normally private mode is disabled

Copy link
Contributor

Choose a reason for hiding this comment

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

Proxy connections is a layer2 concept so having a wider conecpt in the lower layer makes sense

Ah ok, wasn't aware of this fact 👍

We could modify/remove this "Used to filter proxy connections from the connections view" comment as it is bit misleading.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, not about this PR, but why the remotePrivateConnections has the remote-prefix? Is the whole connection private, i.e. both the local and remote see treat it specially? (If that's the case, we could remove the remote-prefix. If it is private only on the remote side, we could rename the accessor to match the field name.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There isn't a real need to maintain the state of the locally private connections as the entire connection manager is in private mode if they exist at all. The remote-prefix is kept to make it clear that they are set by someone else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could remove the comment yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dht Related to DHT package network Related to Network Package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants