WIP feat/routing: use node key as name #1115
Conversation
r? @afck (maidsafe_highfive has picked a reviewer for you, use r? to override) |
2eb5d0c
to
ac14026
Compare
Review status: 0 of 7 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. src/xor_name.rs, line 126 [r2] (raw file):
That's not minus, that's xor. But for the interval length computation we'll need minus. Or rather: the absolute value of the difference. E.g. compute src/states/node.rs, line 979 [r2] (raw file):
Doesn't src/states/node.rs, line 983 [r2] (raw file):
Once Disjoint Groups are in place, this will need to include the lower and upper bound of the group's range (if there are no nodes with exactly those names). Comments from Reviewable |
Review status: 0 of 7 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. src/xor_name.rs, line 126 [r2] (raw file):
|
src/states/node.rs, line 979 [r2] (raw file):
|
Review status: 0 of 7 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. src/states/node.rs, line 979 [r2] (raw file):
|
/// routing table. If yes, and if A's ID is in its ID cache, Z sends its own `ConnectionInfo` back | ||
/// to A and also attempts to connect to A via Crust. A does the same, once it receives the | ||
/// For each `ConnectionInfo` that a node Z(members of Y) receives from A, it decides whether it wants A in its | ||
/// routing table. If yes, and if A's ID is in its ID cache(node A's original ID), Z sends its own |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow... why would Z have A's original ID? For the previous line, it would be nicer if your addition was spelled out: "node Z (of NaeManager
Y)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the group X has notified group Y about A's original id
self.sent_network_name_to = None; | ||
} | ||
} | ||
// TODO: unless Disjoin Group being implemented, it is not guaranteered cache exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling: "Disjoint", "guaranteed"
fn compute_new_id(&mut self, name_range: &(XorName, XorName)) -> Result<(), RoutingError> { | ||
let now = Instant::now(); | ||
loop { | ||
if now.elapsed() > Duration::from_secs(COMPUTING_IDENTITY_TIMEOUT_SECS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets hope the client/joining node is not busy, or it might not manage many iterations. Often this type of code allows a maximum number of tries instead of a timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the network side is waiting based on timeout, so here needs to be wait on timeout as well.
closing this for now. lets get this raised and merged when switching the node name pattern with node ageing. |
This change is