Skip to content

Commit 237a80d

Browse files
eigmaxibmp33
andauthored
chore: update scripts (#150)
* chore: change curve naming to uppercase format (#142) * chore: update scripts --------- Co-authored-by: ibmp33 <[email protected]>
1 parent 3f79a7a commit 237a80d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ For power in range 20 to 26, you can download directly from [universal-setup hub
5555
## Applications
5656
* [Rust zkVM/Risc V/REVM)](https://docs.powdr.org/backends/estark.html)
5757
* [REVM](https://github.com/powdr-labs/powdr/tree/main/riscv/tests/riscv_data/evm)
58+
* [zkml-rust](https://github.com/eigmax/zkml-rust)
5859
* [eigen-secret](https://github.com/0xEigenLabs/eigen-secret)
5960
* [zk-mixer](https://github.com/0xEigenLabs/zk-mixer)

test/snark_verifier.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ SNARK_INPUT=$5/final_input.zkin.json
2424

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

27-
SNARKJS=${CUR_DIR}/aggregation/node_modules/snarkjs/build/cli.cjs
28-
if [ ! -d "${CUR_DIR}/aggregation/node_modules/snarkjs" ]; then
29-
cd ${CUR_DIR}/aggregation && npm install
30-
fi
31-
3227
ZKIT="${CUR_DIR}/../target/release/eigen-zkit"
3328

3429
if [ $first_run = "true" ]; then
@@ -69,6 +64,10 @@ else
6964
echo "Not support ${CURVE}"
7065
exit -1
7166
fi
67+
SNARKJS=${CUR_DIR}/aggregation/node_modules/snarkjs/build/cli.cjs
68+
if [ ! -d "${CUR_DIR}/aggregation/node_modules/snarkjs" ]; then
69+
cd ${CUR_DIR}/aggregation && npm install
70+
fi
7271
if [ ! -f $BIG_SRS ]; then
7372
echo "downloading powersOfTau28_hez_final_${POWER}.ptau"
7473
curl https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final.ptau -o $BIG_SRS

test/stark_aggregation.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ c12_end=$(date +%s)
4747
aggregation_start=$(date +%s)
4848

4949
echo " ==> aggregation stage <== "
50-
if [ ! -f "$WORKSPACE/$RECURSIVE_CIRCUIT.r1cs" ]; then
50+
if [ $first_run = "yes" ]; then
5151
echo "1. compile circuit, use task 0 by default"
52-
${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
52+
${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
5353
else
5454
echo "1.no need compile circom : "$WORKSPACE/$RECURSIVE_CIRCUIT.r1cs" already generated"
5555
fi
@@ -63,7 +63,7 @@ echo "3. generate the pil files and const polynomicals files "
6363
# generate the pil files and const polynomicals files
6464
# input files : $C12_VERIFIER.r1cs
6565
# output files : $C12_VERIFIER.const $C12_VERIFIER.pil $C12_VERIFIER.exec
66-
if [ ! -f "$WORKSPACE/$RECURSIVE_CIRCUIT.pil" ]; then
66+
if [ $first_run = "yes" ]; then
6767
${ZKIT} compressor12_setup \
6868
--r $WORKSPACE/$RECURSIVE_CIRCUIT.r1cs \
6969
--c $WORKSPACE/$RECURSIVE_CIRCUIT.const \
@@ -99,7 +99,7 @@ aggregation_end=$(date +%s)
9999
final_start=$(date +%s)
100100
# final recursive stage
101101
echo " ==> final recursive stage <== "
102-
if [ ! -f "$WORKSPACE/$RECURSIVE2_CIRCUIT.r1cs" ]; then
102+
if [ $first_run = "yes" ]; then
103103
echo "1. compile circuit and generate r1cs and wasm"
104104
${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
105105
else
@@ -108,7 +108,7 @@ fi
108108

109109

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

0 commit comments

Comments
 (0)