lightem90 / testMRMW

MRMW for deployment on test system
0 stars 0 forks source link

Client with higher ID does not update FD when accepting a connection #17

Closed xit4 closed 7 years ago

xit4 commented 8 years ago

When a client with lower ID (let's call it A) connects to a client with higher ID (let's call it B) it correctly updates the FD. On the other hand, when B is accepting A's connection, it does not update the FD (see picture)

Why? Because when B accepts a connection it only sees the remote IP:port of A, so it has no idea which ID connected.

issue

As shown above B has no idea who /127.0.0.1:55483 is. Do we need a "Hello" message right after connection to exchange IDs?

lightem90 commented 8 years ago

Yeah and there's no way to know, from the accepter pow, the node ID of the connecting node. The algorithms we have doesn't give any specification about this. The only solution that comes to my mind is that whenever a node connects if there it sees a majority of connected channels it makes a read operation (if there's no quorum it cannot read otherwise the read op will never complete and no other operations could be made). At that time the fd will be updated.