@@ -47,9 +47,9 @@ c12_end=$(date +%s)
4747aggregation_start=$( date +%s)
4848
4949echo " ==> 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
5353else
5454 echo " 1.no need compile circom : " $WORKSPACE /$RECURSIVE_CIRCUIT .r1cs" already generated"
5555fi
@@ -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)
9999final_start=$( date +%s)
100100# final recursive stage
101101echo " ==> 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
105105else
108108
109109
110110echo " 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