bristolcrypto / SPDZ-2

(Inactive, see readme) Multiparty computation with SPDZ, MASCOT, and Overdrive offline phases
Other
214 stars 361 forks source link

Network issue for offline phase benchmarking #81

Open riedervi opened 2 months ago

riedervi commented 2 months ago

Hello,

when I tried to run ./spdz2-offline.x -h SERVERNAME -p 0 and ./spdz2-offline.x -h SERVERNAME -p 1 (or any other offline phase program) I always got the errors:

This seems to be a strange behavior, since on the client side, the IP address 127.0.0.1 refers to localhost, while 5000 is the port referring to the server. Indeed it seems like names[] in PlainPlayer::setup_sockets (Networking/Player.cpp) wrongly contains the ip_adress of the localhost or is wrongly indexed. Concretely, replacing line 316 set_up_client_socket(sockets[i],names[i].c_str(),ports[i]); by set_up_client_socket(sockets[i], IP_ADRESS_OF_SERVER,ports[i]); makes the program run. This is however a dirty solution which makes the program run without actually fixing the issue. Especially for more then two parties the situation is more complex.

When using IP files -ip instead of the -h specifier, I got similar problems. So my question is: Did I invoke the programs wrongly, or is there a bug inside Players.cpp? What is actually going on?

riedervi commented 2 months ago

Sorry, this issue actually belongs to MP-SPDZ https://github.com/data61/MP-SPDZ/issues/1476 and can be deleted