Browse Source

update mycircuit circom file and its r1cs output

pull/4/head
mmagician 4 months ago
parent
commit
05b77f0c84
No known key found for this signature in database GPG Key ID: BDEF1AAE14CCE516
5 changed files with 27 additions and 2 deletions
  1. +4
    -2
      test-vectors/mycircuit.circom
  2. BIN
      test-vectors/mycircuit.r1cs
  3. +23
    -0
      test-vectors/mycircuit.sh
  4. BIN
      test-vectors/mycircuit.wasm
  5. BIN
      test-vectors/test.zkey

+ 4
- 2
test-vectors/mycircuit.circom

@ -1,6 +1,8 @@
pragma circom 2.1.0;
template Multiplier() {
signal private input a;
signal private input b;
signal input a;
signal input b;
signal output c;
c <== a*b;

BIN
test-vectors/mycircuit.r1cs


+ 23
- 0
test-vectors/mycircuit.sh

@ -0,0 +1,23 @@
# run from within test-vectors dir
DIR="test-vectors"
if [ ! -d "$DIR" ]; then
echo "Directory $DIR does not exist. Please ensure you are running this script from the correct location."
exit 1
fi
cd "$DIR"
echo "compiling"
circom mycircuit.circom --r1cs --wasm
FILE="powersOfTau28_hez_final_17.ptau"
if [ ! -f "$FILE" ]; then
echo "getting powers of tau"
curl -O https://storage.googleapis.com/zkevm/ptau/powersOfTau28_hez_final_17.ptau
else
echo "$FILE already exists"
fi
echo "zkey"
snarkjs zkey new mycircuit.r1cs powersOfTau28_hez_final_17.ptau test.zkey

BIN
test-vectors/mycircuit.wasm


BIN
test-vectors/test.zkey


Loading…
Cancel
Save