Subject: [P2PSIP] RFC6940: Chord total order definition

From: Evgeny <[email-masked]>
Date: Tue, 16 Oct 2018 10:52:34 +0300

Hi, IETF people! :)

Excuse my ignorance: I'm not a big specialist in Chord or DHTs in 
general.
I would like to clarify one thing:
How is the total order [1] defined in the Chord ring? Is it a simple 
order
of integer numbers? But in this case some nodes (the ones "closest to 
zero")
will not have successors or predecessors and, thus, the ring will 
always be
partitioned. If the order is defined using the "wrapping around zero", 
then
any i'th successor of node X will be its j'th predecessor and, thus, 
for example,
if there are only 3 nodes (besides X) and node X needs to keep 3 
successors
and 3 predecessors, then X's successors list will be equal to its 
predecessors list?

In other words, could someone please provide the exact definition, like:
x < y <=> when?

I feel, this is not an internal implementation detail, because a node 
needs
to send its neighbors list and fingers table, so this should be 
interoperable.

[1] https://en.wikipedia.org/wiki/Total_order

---

From: Evgeny <[email-masked]>
Date: Tue, 16 Oct 2018 18:13:31 +0300

> You have to use modulus math when you think of the Chord ring. For
> example, if the node ID size is 8 bits, the ring has at most 256 
> nodes.
> The node 0x00h successor is node 0x01, and the node 0x00 predecessor 
> is
> node 0xff. The ring is continuous from 0xff to 0x00, which is no
> different than any two nodes in the ring.

So, if there is a single node 0x80 and 0x00 is joining, then 0x80 will 
be
both a predecessor and a successor for node 0x00? So it should be put in
both lists? Then, when a node 0x01 is joining then it will have 
predecessors
list [0x00, 0x80] == successors list [0x00, 0x80]? Does it make sense?