From e5b45397ad88a303b0675dd6967df91e8dceda9e Mon Sep 17 00:00:00 2001 From: Geoff Lamperd Date: Tue, 28 Feb 2023 15:46:23 +1100 Subject: [PATCH 1/5] fixes GLIBC_2.29 missing --- Dockerfile | 2 +- phase2/test.sh | 0 powersoftau/test.sh | 0 3 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 phase2/test.sh mode change 100755 => 100644 powersoftau/test.sh diff --git a/Dockerfile b/Dockerfile index 33c79a520..6fead38b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:slim as builder +FROM rust:slim-buster as builder RUN apt-get update && \ apt-get install -y pkg-config libssl-dev && \ rm -rf /var/lib/apt/lists/* diff --git a/phase2/test.sh b/phase2/test.sh old mode 100755 new mode 100644 diff --git a/powersoftau/test.sh b/powersoftau/test.sh old mode 100755 new mode 100644 From e8e32ce5db72844eb9507c94ef57dbc31492e628 Mon Sep 17 00:00:00 2001 From: Geoff Lamperd Date: Tue, 28 Feb 2023 16:18:18 +1100 Subject: [PATCH 2/5] fixes GLIBC_2.29 missing --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 33c79a520..6fead38b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:slim as builder +FROM rust:slim-buster as builder RUN apt-get update && \ apt-get install -y pkg-config libssl-dev && \ rm -rf /var/lib/apt/lists/* From 0fdb1f7e06a9a8de5fb53667b08bf43fac3eabbe Mon Sep 17 00:00:00 2001 From: Geoff Lamperd Date: Tue, 28 Feb 2023 15:26:26 +1000 Subject: [PATCH 3/5] Delete test.sh --- phase2/test.sh | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 phase2/test.sh diff --git a/phase2/test.sh b/phase2/test.sh deleted file mode 100644 index 141a77404..000000000 --- a/phase2/test.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -if [ ! -f ../powersoftau/phase1radix2m0 ]; then - echo "Please run powers of tau test first to generate radix files" - exit 1 -fi - -# move results of powers of tau here -cp ../powersoftau/phase1radix* . - -npm install - -# compile circuit -npx circom circuit.circom -o circuit.json && npx snarkjs info -c circuit.json -# npx snarkjs info -c circuit.json - -# initialize ceremony -cargo run --release --bin new circuit.json circom1.params ./ - -cargo run --release --bin contribute circom1.params circom2.params asdajdzixcjlzxjczxlkcjzxlkcj -cargo run --release --bin verify_contribution circuit.json circom1.params circom2.params ./ - -cargo run --release --bin contribute circom2.params circom3.params dsfjkshdfakjhsdf -cargo run --release --bin verify_contribution circuit.json circom2.params circom3.params ./ - -cargo run --release --bin contribute circom3.params circom4.params askldfjklasdf -cargo run --release --bin verify_contribution circuit.json circom3.params circom4.params ./ - -# create dummy keys in circom format -echo "Generating dummy key files..." -npx snarkjs setup --protocol groth -# generate resulting keys -cargo run --release --bin export_keys circom4.params vk.json pk.json -# patch dummy keys with actual keys params -cargo run --release --bin copy_json proving_key.json pk.json transformed_pk.json - -# generate solidity verifier -cargo run --release --bin generate_verifier circom4.params verifier.sol - -# try to generate and verify proof -npx snarkjs calculatewitness -cargo run --release --bin prove circuit.json witness.json circom4.params proof.json public.json -npx snarkjs verify --vk vk.json --proof proof.json From b26f56076d2f1841310314b1c4f216603097624c Mon Sep 17 00:00:00 2001 From: Geoff Lamperd Date: Tue, 28 Feb 2023 15:26:53 +1000 Subject: [PATCH 4/5] Delete test.sh --- powersoftau/test.sh | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 powersoftau/test.sh diff --git a/powersoftau/test.sh b/powersoftau/test.sh deleted file mode 100644 index bb46187c9..000000000 --- a/powersoftau/test.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -rm challenge* -rm response* -rm transcript -rm phase1radix* -rm tmp_* - -set -e - -SIZE=10 -BATCH=256 - -cargo run --release --bin new_constrained challenge1 $SIZE $BATCH -yes | cargo run --release --bin compute_constrained challenge1 response1 $SIZE $BATCH -cargo run --release --bin verify_transform_constrained challenge1 response1 challenge2 $SIZE $BATCH - -yes | cargo run --release --bin compute_constrained challenge2 response2 $SIZE $BATCH -cargo run --release --bin verify_transform_constrained challenge2 response2 challenge3 $SIZE $BATCH - -yes | cargo run --release --bin compute_constrained challenge3 response3 $SIZE $BATCH -cargo run --release --bin verify_transform_constrained challenge3 response3 challenge4 $SIZE $BATCH - -cargo run --release --bin beacon_constrained challenge4 response4 $SIZE $BATCH 0000000000000000000a558a61ddc8ee4e488d647a747fe4dcc362fe2026c620 10 -cargo run --release --bin verify_transform_constrained challenge4 response4 challenge5 $SIZE $BATCH - -cargo run --release --bin prepare_phase2 response4 $SIZE $BATCH From 7a89b2ff4f8ac2b8b5b47722f5c3101e1c64e95e Mon Sep 17 00:00:00 2001 From: Geoff Lamperd Date: Tue, 28 Feb 2023 16:30:05 +1100 Subject: [PATCH 5/5] restores test scripts --- phase2/test.sh | 2 +- powersoftau/test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phase2/test.sh b/phase2/test.sh index 141a77404..943582031 100644 --- a/phase2/test.sh +++ b/phase2/test.sh @@ -42,4 +42,4 @@ cargo run --release --bin generate_verifier circom4.params verifier.sol # try to generate and verify proof npx snarkjs calculatewitness cargo run --release --bin prove circuit.json witness.json circom4.params proof.json public.json -npx snarkjs verify --vk vk.json --proof proof.json +npx snarkjs verify --vk vk.json --proof proof.json \ No newline at end of file diff --git a/powersoftau/test.sh b/powersoftau/test.sh index bb46187c9..c6b9825ff 100644 --- a/powersoftau/test.sh +++ b/powersoftau/test.sh @@ -24,4 +24,4 @@ cargo run --release --bin verify_transform_constrained challenge3 response3 chal cargo run --release --bin beacon_constrained challenge4 response4 $SIZE $BATCH 0000000000000000000a558a61ddc8ee4e488d647a747fe4dcc362fe2026c620 10 cargo run --release --bin verify_transform_constrained challenge4 response4 challenge5 $SIZE $BATCH -cargo run --release --bin prepare_phase2 response4 $SIZE $BATCH +cargo run --release --bin prepare_phase2 response4 $SIZE $BATCH \ No newline at end of file