Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: print script logs upon failure #686

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading