Skip to content

Commit

Permalink
fix: environment and script
Browse files Browse the repository at this point in the history
  • Loading branch information
atanmarko committed Jun 21, 2024
1 parent 79a4859 commit 082036c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/jerigon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ env:
jobs:
test_jerigon_input_proving:
name: Test proof generation with jerigon input
runs-on: ubuntu-latest
timeout-minutes: 60
runs-on: zero-ci
timeout-minutes: 40
# if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Checkout sources
Expand Down Expand Up @@ -65,15 +65,15 @@ jobs:
- name: Run prove blocks in test_only mode
run: |
cd zero_bin/tools
./prove_rpc.sh 0x2 0x7 http://localhost:8546 jerigon true 0 0 test_only
OUTPUT_TO_TERMINAL=true ./prove_rpc.sh 0x2 0x3 http://localhost:8546 jerigon true 0 0 test_only
echo "Proving blocks in test_only mode done"
- name: Run prove blocks in real mode
run: |
cd zero_bin/tools
rm -rf debug/* proofs/* circuits/* ./proof.json test.out verify.out leader.out
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./prove_rpc.sh 0x2 0x4 http://localhost:8546 jerigon true
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./prove_rpc.sh 0x6 0x7 http://localhost:8546 jerigon true
echo "Proving blocks in real mode done"
- name: Shut down network
Expand Down
8 changes: 6 additions & 2 deletions zero_bin/tools/prove_rpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ if [[ $8 == "test_only" ]]; then
command='cargo r --release --features test_only --bin leader -- --runtime in-memory --load-strategy on-demand "$NODE_RPC_TYPE" --rpc-url "$NODE_RPC_URL" --block-interval $BLOCK_INTERVAL --proof-output-dir $PROOF_OUTPUT_DIR $PREV_PROOF_EXTRA_ARG --backoff "$BACKOFF" --max-retries "$RETRIES" '
if [ "$OUTPUT_TO_TERMINAL" = true ]; then
eval $command
RESULT=$?
echo -e "Proof witness generation finished with result: $RESULT"
exit $RESULT
else
eval $command > $OUT_LOG_PATH 2>&1
if grep -q 'All proof witnesses have been generated successfully.' $OUT_LOG_PATH; then
Expand All @@ -114,6 +117,9 @@ else
command='cargo r --release --bin leader -- --runtime in-memory --load-strategy on-demand "$NODE_RPC_TYPE" --rpc-url "$3" --block-interval $BLOCK_INTERVAL --proof-output-dir $PROOF_OUTPUT_DIR $PREV_PROOF_EXTRA_ARG --backoff "$BACKOFF" --max-retries "$RETRIES"'
if [ "$OUTPUT_TO_TERMINAL" = true ]; then
eval $command
RESULT=$?
echo -e "Proof generation finished with result: $RESULT"
exit $RESULT
else
eval $command > $OUT_LOG_PATH 2>&1
retVal=$?
Expand All @@ -132,8 +138,6 @@ else
fi




# If we're running the verification, we'll do it here.
if [ "$RUN_VERIFICATION" = true ]; then
echo "Running the verification"
Expand Down

0 comments on commit 082036c

Please sign in to comment.