With network segregation we will potentially have separate networks to keep track of. So when finding a node within a specific network, it will actively work against us to search through nodes that are not a part of that network. This will affect us when asking a node what nodes it's connected to and what nodes it has connected to during to nodes find process.
To streamline and optimise things, when responding to these requests we must filter for only the nodes in the requested network. There are two RPC calls affected by this, nodesClosestActiveConnectionsGet and nodesClosestLocalNodesGet. These RPC calls must take a network parameter on the input and only respond with nodes in that network as part of the output.
To achieve this we need to update the NodeConnectionManager to be aware of what networks each connections have access to as well as updating the NodeGraph to track the network each entry connected on. On top of that they need to filter for specific networks on request when getting lists of nodes.
All of this will be very important for the find node logic in the NodeManager.
We also may have to account for the security by checking if the connection requesting has access to said network. We could potentially make selection of network seamless by extracting that data from the connection and using it implicitly when filtering the responses.
Additional context
Related: #770
Tasks
Update the NodeConnectionManager to be aware of the networks each connection has access to.
Update the NodeGraph to be aware of the networks each entry is a part of.
Update the RPC calls for requesting closest nodes and active connections to filter for a specific network.
Review and conciser the security aspect of checking what network the requester has access to.
Specification
With network segregation we will potentially have separate networks to keep track of. So when finding a node within a specific network, it will actively work against us to search through nodes that are not a part of that network. This will affect us when asking a node what nodes it's connected to and what nodes it has connected to during to nodes find process.
To streamline and optimise things, when responding to these requests we must filter for only the nodes in the requested network. There are two RPC calls affected by this,
nodesClosestActiveConnectionsGet
andnodesClosestLocalNodesGet
. These RPC calls must take a network parameter on the input and only respond with nodes in that network as part of the output.To achieve this we need to update the
NodeConnectionManager
to be aware of what networks each connections have access to as well as updating theNodeGraph
to track the network each entry connected on. On top of that they need to filter for specific networks on request when getting lists of nodes.All of this will be very important for the find node logic in the
NodeManager
.We also may have to account for the security by checking if the connection requesting has access to said network. We could potentially make selection of network seamless by extracting that data from the connection and using it implicitly when filtering the responses.
Additional context
Related: #770
Tasks
NodeConnectionManager
to be aware of the networks each connection has access to.NodeGraph
to be aware of the networks each entry is a part of.