From 61a79deb65084c3797dc3128d72d6c3ffb0f6483 Mon Sep 17 00:00:00 2001 From: Erhan Tezcan Date: Sat, 18 Feb 2023 19:59:06 +0300 Subject: [PATCH] setup done --- package.json | 9 +++++---- scripts/ptau-phase1.sh | 36 ------------------------------------ scripts/ptau-phase2.sh | 2 +- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 45 deletions(-) delete mode 100755 scripts/ptau-phase1.sh diff --git a/package.json b/package.json index d866c3d..1d4773b 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.1", "description": "An opinionated development environment for developing circuits using Circom and TypeScript!", "main": "index.js", + "license": "MIT", "scripts": { "clean": "rm -fR dist", "build": "npm run clean && tsc -p .tsconfig.json", @@ -10,17 +11,17 @@ }, "author": "erhant", "devDependencies": { - "circomlib": "^2.0.5", - "circomlibjs": "^0.1.7", - "snarkjs": "^0.5.0", "@types/chai": "^4.3.4", "@types/mocha": "^10.0.1", "@types/node": "^18.11.18", "chai": "^4.3.7", "circom_tester": "^0.0.19", - "ethers": "^6.0.3", + "circomlib": "^2.0.5", + "circomlibjs": "^0.1.7", + "ethers": "^6.0.4", "gts": "^3.1.1", "mocha": "^10.2.0", + "snarkjs": "^0.5.0", "ts-node": "^10.9.1", "typescript": "^4.9.5" } diff --git a/scripts/ptau-phase1.sh b/scripts/ptau-phase1.sh deleted file mode 100755 index da5f556..0000000 --- a/scripts/ptau-phase1.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -## Commence a universal phase-1 powers-of-tau ceremony - -# abort on error -set -e - -# get to the root directory of this project -cd "${0%/*}"/.. - -if [[ $# -ne 1 ]]; then - echo "Usage:" - echo "$0 " - exit 1 -fi - -# set variables -NUM_CONTRIBS=$1 # number of contributions -PTAU_DIR="./build/ptau" # output directory of ptaus -CUR=0000 # ptau id, initially 0000 - -# create ptau output directory if not exists -mkdir -p $PTAU_DIR - -# start phase-1 ceremony -echo "Starting Powers of Tau ceremony." -snarkjs powersoftau new bn128 12 ${PTAU_DIR}/pot12_${CUR}.ptau -v - -# make contributions -for NEXT in $(seq -f "%04g" 1 ${NUM_CONTRIBS}) -do - echo "Making Phase-1 Contribution: ${NEXT}" - snarkjs powersoftau contribute ${PTAU_DIR}/pot12_${CUR}.ptau ${PTAU_DIR}/pot12_${NEXT}.ptau -v - rm ${PTAU_DIR}/pot12_${CUR}.ptau - CUR=$NEXT -done -echo "Phase 1 Complete." diff --git a/scripts/ptau-phase2.sh b/scripts/ptau-phase2.sh index e93b57a..d436ed7 100755 --- a/scripts/ptau-phase2.sh +++ b/scripts/ptau-phase2.sh @@ -19,7 +19,7 @@ NUM_CONTRIBS=$2 # number of contributions CIRCUIT_DIR=./build/$CIRCUIT # circuit directory P1_PTAU=./ptau/powersOfTau28_hez_final_12.ptau # input directory of ptaus P2_PTAU=$CIRCUIT_DIR/pot12_final.ptau # phase-2 ptau -CUR=000 # zkey id, initially 0000 +CUR=000 # zkey id, initially 0 # create zkey output directory if not exists mkdir -p $ZKEY_DIR diff --git a/yarn.lock b/yarn.lock index 2174f55..c6698aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1339,10 +1339,10 @@ ethers@^5.5.1: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -ethers@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.0.3.tgz#00a525cc70306624dfc88d6438addcb001eb7a42" - integrity sha512-ECUt+AlY80eLA/XvOgy4/K5Pq5BsMzlKKcSuUXOgp4k6d3tcDphEiz+Fs3zut/zYQVgqLgm3f8YtCJEEtzl8kA== +ethers@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.0.4.tgz#4ff48a94e51248cdcdca762deda2b98d595a2889" + integrity sha512-El/9IN2A0ptmxdMQA/Rzn/F80/8OpwHSQ+CkU83y6XIT0fNUz2M2X12VCWzlkmLV0dTGk45gdWR6gxNfyXdylg== dependencies: "@adraffy/ens-normalize" "1.8.9" "@noble/hashes" "1.1.2"