Skip to content

Commit

Permalink
chore: update scripts (#150)
Browse files Browse the repository at this point in the history
* chore: change curve naming to uppercase format (#142)

* chore: update scripts

---------

Co-authored-by: ibmp33 <[email protected]>
  • Loading branch information
eigmax and ibmp33 authored Oct 31, 2023
1 parent 3f79a7a commit 237a80d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ For power in range 20 to 26, you can download directly from [universal-setup hub
## Applications
* [Rust zkVM/Risc V/REVM)](https://docs.powdr.org/backends/estark.html)
* [REVM](https://github.com/powdr-labs/powdr/tree/main/riscv/tests/riscv_data/evm)
* [zkml-rust](https://github.com/eigmax/zkml-rust)
* [eigen-secret](https://github.com/0xEigenLabs/eigen-secret)
* [zk-mixer](https://github.com/0xEigenLabs/zk-mixer)
9 changes: 4 additions & 5 deletions test/snark_verifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ SNARK_INPUT=$5/final_input.zkin.json

RUNDIR="${CUR_DIR}/../starkjs"

SNARKJS=${CUR_DIR}/aggregation/node_modules/snarkjs/build/cli.cjs
if [ ! -d "${CUR_DIR}/aggregation/node_modules/snarkjs" ]; then
cd ${CUR_DIR}/aggregation && npm install
fi

ZKIT="${CUR_DIR}/../target/release/eigen-zkit"

if [ $first_run = "true" ]; then
Expand Down Expand Up @@ -69,6 +64,10 @@ else
echo "Not support ${CURVE}"
exit -1
fi
SNARKJS=${CUR_DIR}/aggregation/node_modules/snarkjs/build/cli.cjs
if [ ! -d "${CUR_DIR}/aggregation/node_modules/snarkjs" ]; then
cd ${CUR_DIR}/aggregation && npm install
fi
if [ ! -f $BIG_SRS ]; then
echo "downloading powersOfTau28_hez_final_${POWER}.ptau"
curl https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final.ptau -o $BIG_SRS
Expand Down
10 changes: 5 additions & 5 deletions test/stark_aggregation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ c12_end=$(date +%s)
aggregation_start=$(date +%s)

echo " ==> aggregation stage <== "
if [ ! -f "$WORKSPACE/$RECURSIVE_CIRCUIT.r1cs" ]; then
if [ $first_run = "yes" ]; then
echo "1. compile circuit, use task 0 by default"
${ZKIT} compile -p goldilocks -i $CUR_DIR/../starkjs/circuits/0/$RECURSIVE_CIRCUIT.circom -l "../starkjs/node_modules/pil-stark/circuits.gl" -l "../starkjs/node_modules/circomlib/circuits" --O2=full -o $WORKSPACE
${ZKIT} compile -p goldilocks -i $WORKSPACE/circuits/0/$RECURSIVE_CIRCUIT.circom -l "../starkjs/node_modules/pil-stark/circuits.gl" -l "../starkjs/node_modules/circomlib/circuits" --O2=full -o $WORKSPACE
else
echo "1.no need compile circom : "$WORKSPACE/$RECURSIVE_CIRCUIT.r1cs" already generated"
fi
Expand All @@ -63,7 +63,7 @@ echo "3. generate the pil files and const polynomicals files "
# generate the pil files and const polynomicals files
# input files : $C12_VERIFIER.r1cs
# output files : $C12_VERIFIER.const $C12_VERIFIER.pil $C12_VERIFIER.exec
if [ ! -f "$WORKSPACE/$RECURSIVE_CIRCUIT.pil" ]; then
if [ $first_run = "yes" ]; then
${ZKIT} compressor12_setup \
--r $WORKSPACE/$RECURSIVE_CIRCUIT.r1cs \
--c $WORKSPACE/$RECURSIVE_CIRCUIT.const \
Expand Down Expand Up @@ -99,7 +99,7 @@ aggregation_end=$(date +%s)
final_start=$(date +%s)
# final recursive stage
echo " ==> final recursive stage <== "
if [ ! -f "$WORKSPACE/$RECURSIVE2_CIRCUIT.r1cs" ]; then
if [ $first_run = "yes" ]; then
echo "1. compile circuit and generate r1cs and wasm"
${ZKIT} compile -p goldilocks -i $WORKSPACE/circuits/$RECURSIVE2_CIRCUIT.circom -l "../starkjs/node_modules/pil-stark/circuits.gl" -l "../starkjs/node_modules/circomlib/circuits" --O2=full -o $WORKSPACE
else
Expand All @@ -108,7 +108,7 @@ fi


echo "2. generate the pil files and const polynomicals files "
if [ ! -f "$WORKSPACE/$RECURSIVE2_CIRCUIT.pil" ]; then
if [ $first_run = "yes" ]; then
${ZKIT} compressor12_setup \
--r $WORKSPACE/$RECURSIVE2_CIRCUIT.r1cs \
--c $WORKSPACE/$RECURSIVE2_CIRCUIT.const \
Expand Down

0 comments on commit 237a80d

Please sign in to comment.