From ee80802cc93d5faf070bbc3d7434afdb0d98d00e Mon Sep 17 00:00:00 2001 From: sheagrief <3a.mad1earth4@gmail.com> Date: Thu, 24 Oct 2024 17:22:42 +0900 Subject: [PATCH 1/2] fix: Add address data for 2PC, 3PC, and 4PC --- data/2 | 2 ++ data/{address => 3} | 0 data/4 | 4 ++++ mpc-algebra/test.zsh | 4 ++-- run_groth16.zsh | 4 ++-- run_marlin.zsh | 4 ++-- run_online.zsh | 4 ++-- run_werewolf.zsh | 20 ++++++++++---------- 8 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 data/2 rename data/{address => 3} (100%) create mode 100644 data/4 diff --git a/data/2 b/data/2 new file mode 100644 index 00000000..710debf3 --- /dev/null +++ b/data/2 @@ -0,0 +1,2 @@ +127.0.0.1:8000 +127.0.0.1:8001 \ No newline at end of file diff --git a/data/address b/data/3 similarity index 100% rename from data/address rename to data/3 diff --git a/data/4 b/data/4 new file mode 100644 index 00000000..0daecb60 --- /dev/null +++ b/data/4 @@ -0,0 +1,4 @@ +127.0.0.1:8000 +127.0.0.1:8001 +127.0.0.1:8002 +127.0.0.1:8003 \ No newline at end of file diff --git a/mpc-algebra/test.zsh b/mpc-algebra/test.zsh index bd666cb5..b67c20bb 100755 --- a/mpc-algebra/test.zsh +++ b/mpc-algebra/test.zsh @@ -15,11 +15,11 @@ for i in $(seq 0 2) do if [ $i == 0 ] then - RUST_BACKTRACE=1 $BIN $i ./data/address & + RUST_BACKTRACE=1 $BIN $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN $i ./data/address > /dev/null & + $BIN $i ./data/3 > /dev/null & pid=$! PROCS[$i]=$pid fi diff --git a/run_groth16.zsh b/run_groth16.zsh index b5cd4613..db2993b1 100755 --- a/run_groth16.zsh +++ b/run_groth16.zsh @@ -12,11 +12,11 @@ for i in $(seq 0 2) do if [ $i == 0 ] then - RUST_BACKTRACE=1 $BIN $i ./data/address & + RUST_BACKTRACE=1 $BIN $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN $i ./data/address > /dev/null & + $BIN $i ./data/3 > /dev/null & pid=$! PROCS[$i]=$pid fi diff --git a/run_marlin.zsh b/run_marlin.zsh index 6b1a33be..6954b619 100755 --- a/run_marlin.zsh +++ b/run_marlin.zsh @@ -12,11 +12,11 @@ for i in $(seq 0 2) do if [ $i == 0 ] then - RUST_BACKTRACE=1 $BIN $i ./data/address & + RUST_BACKTRACE=1 $BIN $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN $i ./data/address > /dev/null & + $BIN $i ./data/3 > /dev/null & pid=$! PROCS[$i]=$pid fi diff --git a/run_online.zsh b/run_online.zsh index 2322f6fd..299038fe 100755 --- a/run_online.zsh +++ b/run_online.zsh @@ -12,11 +12,11 @@ for i in $(seq 0 2) do if [ $i == 0 ] then - RUST_BACKTRACE=1 $BIN marlin ./inputs/inputs.json $i ./data/address & + RUST_BACKTRACE=1 $BIN marlin ./inputs/inputs.json $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN marlin ./inputs/inputs.json $i ./data/address > /dev/null & + $BIN marlin ./inputs/inputs.json $i ./data/3 > /dev/null & pid=$! PROCS[$i]=$pid fi diff --git a/run_werewolf.zsh b/run_werewolf.zsh index 31e10173..0017123d 100755 --- a/run_werewolf.zsh +++ b/run_werewolf.zsh @@ -20,11 +20,11 @@ init) for i in $(seq 0 $((players - 1))); do mkdir -p ./werewolf_game/$i if [ $i == 0 ]; then - RUST_BACKTRACE=1 $BIN preprocessing $i ./data/address & + RUST_BACKTRACE=1 $BIN preprocessing $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN preprocessing $i ./data/address >/dev/null & + $BIN preprocessing $i ./data/3 >/dev/null & pid=$! PROCS[$i]=$pid fi @@ -41,11 +41,11 @@ night) fi for i in $(seq 0 $((players - 1))); do if [ $i == 0 ]; then - RUST_BACKTRACE=1 $BIN night --target 1 $i ./data/address & + RUST_BACKTRACE=1 $BIN night --target 1 $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN night $i ./data/address >/dev/null & + $BIN night $i ./data/3 >/dev/null & pid=$! PROCS[$i]=$pid fi @@ -58,11 +58,11 @@ night) role_assignment) for i in $(seq 0 $((players - 1))); do if [ $i == 0 ]; then - RUST_BACKTRACE=1 $BIN role_assignment $i ./data/address & + RUST_BACKTRACE=1 $BIN role_assignment $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN role_assignment $i ./data/address >/dev/null & + $BIN role_assignment $i ./data/3 >/dev/null & pid=$! PROCS[$i]=$pid fi @@ -75,11 +75,11 @@ role_assignment) vote) for i in $(seq 0 $((players - 1))); do if [ $i == 0 ]; then - RUST_BACKTRACE=1 $BIN vote $i ./data/address & + RUST_BACKTRACE=1 $BIN vote $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN vote $i ./data/address >/dev/null & + $BIN vote $i ./data/3 >/dev/null & pid=$! PROCS[$i]=$pid fi @@ -92,11 +92,11 @@ vote) judgment) for i in $(seq 0 $((players - 1))); do if [ $i == 0 ]; then - RUST_BACKTRACE=1 $BIN judgment $i ./data/address & + RUST_BACKTRACE=1 $BIN judgment $i ./data/3 & pid=$! PROCS[$i]=$pid else - $BIN judgment $i ./data/address >/dev/null & + $BIN judgment $i ./data/3 >/dev/null & pid=$! PROCS[$i]=$pid fi From a338973a31b3af55cdde59ca711de419105228bd Mon Sep 17 00:00:00 2001 From: sheagrief <3a.mad1earth4@gmail.com> Date: Thu, 24 Oct 2024 17:43:02 +0900 Subject: [PATCH 2/2] fix address data in mpc-algebra --- mpc-algebra/data/2 | 2 ++ mpc-algebra/data/{address => 3} | 0 mpc-algebra/data/4 | 4 ++++ 3 files changed, 6 insertions(+) create mode 100644 mpc-algebra/data/2 rename mpc-algebra/data/{address => 3} (100%) create mode 100644 mpc-algebra/data/4 diff --git a/mpc-algebra/data/2 b/mpc-algebra/data/2 new file mode 100644 index 00000000..710debf3 --- /dev/null +++ b/mpc-algebra/data/2 @@ -0,0 +1,2 @@ +127.0.0.1:8000 +127.0.0.1:8001 \ No newline at end of file diff --git a/mpc-algebra/data/address b/mpc-algebra/data/3 similarity index 100% rename from mpc-algebra/data/address rename to mpc-algebra/data/3 diff --git a/mpc-algebra/data/4 b/mpc-algebra/data/4 new file mode 100644 index 00000000..0daecb60 --- /dev/null +++ b/mpc-algebra/data/4 @@ -0,0 +1,4 @@ +127.0.0.1:8000 +127.0.0.1:8001 +127.0.0.1:8002 +127.0.0.1:8003 \ No newline at end of file