Skip to content

Commit

Permalink
Tweak scripts (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare authored Oct 2, 2024
1 parent 24f11a1 commit ec5778d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions scripts/prove_rpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ else
eval $command > $OUT_LOG_PATH 2>&1
retVal=$?
if [ $retVal -ne 0 ]; then
# Some error occurred.
# Some error occurred, display the logs and exit.
cat $OUT_LOG_PATH
echo "Block ${i} errored. See ${OUT_LOG_PATH} for more details."
exit $retVal
else
Expand All @@ -166,7 +167,9 @@ if [ "$RUN_VERIFICATION" = true ]; then
echo "$proof_file_name verified successfully!";
rm $PROOF_OUTPUT_DIR/verify.out
else
echo "there was an issue with proof verification";
# Some error occurred with verification, display the logs and exit.
cat $PROOF_OUTPUT_DIR/verify.out
echo "There was an issue with proof verification. See $PROOF_OUTPUT_DIR/verify.out for more details.";
exit 1
fi
else
Expand Down
10 changes: 8 additions & 2 deletions scripts/prove_stdio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ if [[ $TEST_ONLY == "test_only" ]]; then
rm $TEST_OUT_PATH
exit
else
echo "Failed to create proof witnesses. See \"zk_evm/tools/test.out\" for more details."
# Some error occurred, display the logs and exit.
cat $OUT_LOG_PATH
echo "Failed to create proof witnesses. See $OUT_LOG_PATH for more details."
exit 1
fi
fi
Expand All @@ -117,6 +119,8 @@ end_time=$(date +%s%N)
set +o pipefail
cat $OUTPUT_LOG | grep "Successfully wrote to disk proof file " | awk '{print $NF}' | tee $PROOFS_FILE_LIST
if [ ! -s "$PROOFS_FILE_LIST" ]; then
# Some error occurred, display the logs and exit.
cat $OUTPUT_LOG
echo "Proof list not generated, some error happened. For more details check the log file $OUTPUT_LOG"
exit 1
fi
Expand All @@ -130,7 +134,9 @@ do
echo "Proof verification for file $proof_file successful";
rm $verify_file # we keep the generated proof for potential reuse
else
echo "there was an issue with proof verification";
# Some error occurred with verification, display the logs and exit.
cat $verify_file
echo "There was an issue with proof verification. See $verify_file for more details.";
exit 1
fi
done
Expand Down

0 comments on commit ec5778d

Please sign in to comment.