From f63ec02058db447096ba00f3856d3a031f51b6fc Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Thu, 20 Oct 2022 15:58:05 +1100 Subject: [PATCH 1/5] Remove Rust checks --- .github/workflows/check.yml | 43 ------------------------------------- 1 file changed, 43 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 04674a2..4ea628e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,49 +1,6 @@ name: CI on: [push, pull_request] jobs: - rust-check: - name: Rust Checks - env: - CARGO_TERM_COLOR: always - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - uses: actions-rs/cargo@v1 - name: Build - with: - command: build - args: --tests -# todo: enable this action once Step trait no longer causes release build failures -# - uses: actions-rs/cargo@v1 -# name: Release Build -# with: -# command: build -# args: --release - - - uses: actions-rs/cargo@v1 - name: Check formatting - if: ${{ success() || failure() }} - with: - command: fmt - args: --all -- --check - - - uses: actions-rs/cargo@v1 - name: Clippy - if: ${{ success() || failure() }} - with: - command: clippy - args: --tests -- -D warnings -D clippy::pedantic - - - uses: actions-rs/cargo@v1 - name: Run Tests - with: - command: test - python-check: name: Python Checks runs-on: ubuntu-latest From 44147e962ad0da850a84127fbf00643762749515 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Thu, 20 Oct 2022 15:58:18 +1100 Subject: [PATCH 2/5] Use HTTP for cloning MP-SPDZ --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 562919c..5c17cf2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ flake518 isort docopt schema --e git+ssh://git@github.com/eriktaubeneck/MP-SPDZ.git@39b6d7e22dedc5798823d306741d33ff6635bc25#egg=mp_spdz_compiler +-e git+https://github.com/eriktaubeneck/MP-SPDZ@39b6d7e22dedc5798823d306741d33ff6635bc25#egg=mp_spdz_compiler From 588cb5bacb6865f0238df04f6813944674902b10 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Thu, 20 Oct 2022 15:59:29 +1100 Subject: [PATCH 3/5] Remove rust from pre-commit --- pre-commit | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pre-commit b/pre-commit index ec287a2..da09b63 100755 --- a/pre-commit +++ b/pre-commit @@ -10,7 +10,6 @@ root="$(git rev-parse --show-toplevel 2>/dev/null)" set -e # Some sanity checking. -hash cargo [[ -n "$root" ]] # Installation. @@ -29,14 +28,6 @@ fi stashfile=$(mktemp .pre-commit.stashXXXXXX) trap 'set +e;git stash pop -q; rm -f "$stashfile"' EXIT git stash push -k -u -q -m "pre-commit stash" -if ! errors=($(cargo fmt -- --check -l)); then - echo "Formatting errors found." - echo "Run \`cargo fmt\` to fix the following files:" - for err in "${errors[@]}"; do - echo " $err" - done - exit 1 -fi error() { echo "-----------------------" @@ -44,10 +35,6 @@ error() { exit 1 } -cargo clippy --tests -- -D warnings --D clippy::pedantic || error "Clippy errors" - -cargo test || error "Test failures" - VENV="$root/.venv/bin" pyrun() { x="$1" From 4a9eb18e265e36a677baff51da3c1e6a5384e179 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Thu, 20 Oct 2022 16:00:51 +1100 Subject: [PATCH 4/5] Update .gitignore --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 124d1e4..df2e7ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,11 @@ +*.code-workspace +*.swp +*~ +/.venv/ +/.vscode/ Player-Data/ -Programs/Public-Input/ Programs/Bytecode/ +Programs/Public-Input/ Programs/Schedules/ __pycache__/ dist/ From 8098345c571616ad4bd27e7683ab72b23e146d7c Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Thu, 20 Oct 2022 16:58:50 +1100 Subject: [PATCH 5/5] Update relative paths in the readme --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 86b858e..75c6771 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To run the prototype, you will need to clone the MP-SPDZ repo so that it neighbo From the current directory (i.e. `raw-ipa/research-prototype`) ```bash -cd ../.. +cd .. gh repo clone data61/MP-SPDZ cd MP-SPDZ @@ -38,7 +38,7 @@ make clean -B -j 8 replicated-ring-party.x Finally, you'll need to setup SSL for the parties. From the `raw-ipa/research-prototype` directory, run: ```bash -../../MP-SPDZ/Scripts/setup-ssl.sh 3 +../MP-SPDZ/Scripts/setup-ssl.sh 3 ``` ## Running the Prototype @@ -50,20 +50,20 @@ Make sure you are now back in this directory, `raw-ipa/research-prototype`. You'll need to create a python virtual environment, and install the requirements. ```bash -python3 virtualenv ../.venv -source ../.venv/bin/activate +python3 virtualenv .venv +source .venv/bin/activate pip install -r ../requirements.txt ``` Note that this will also install a version of the MP-SPDZ compiler. You can also install that directly with your local copy with ``` -pip install -e ../../MP-SPDZ +pip install -e ../MP-SPDZ ``` ### Running IPA scripts -From this `raw-ipa/research-prototype` repository, you can now run the IPA scripts with: +From this `research-prototype` repository, you can now run the IPA scripts with: ```bash python ipa @@ -97,7 +97,7 @@ You can use the same arguments with both `compile` and `generate_input` (though To simulate the MPC locally, run: ```bash -../../MP-SPDZ/Scripts/ring.sh -R 32 ipae2e +../MP-SPDZ/Scripts/ring.sh -R 32 ipae2e ``` ### Running the MPC on multiple hosts @@ -124,17 +124,17 @@ COORDINATOR= Run this command on the coordinator host ```bash -../../MP-SPDZ/replicated-ring-party.x --player 0 ipae2e --hostname $COORDINATOR +../MP-SPDZ/replicated-ring-party.x --player 0 ipae2e --hostname $COORDINATOR ``` Start two other MPC parties: host 1: ```bash -../../MP-SPDZ/replicated-ring-party.x --player 1 ipae2e --hostname $COORDINATOR +../MP-SPDZ/replicated-ring-party.x --player 1 ipae2e --hostname $COORDINATOR ``` host 2: ```bash -../../MP-SPDZ/replicated-ring-party.x --player 1 ipae2e --hostname $COORDINATOR +../MP-SPDZ/replicated-ring-party.x --player 1 ipae2e --hostname $COORDINATOR ```