From 1b4c9456e104e452d3edc61d756fc0a81c7c4a04 Mon Sep 17 00:00:00 2001 From: Serhii Shymkiv Date: Tue, 22 Oct 2024 11:27:01 +0300 Subject: [PATCH] Addressing some review comments. --- .github/workflows/o1vm-ci.yml | 24 +++++++++++++++++++++--- o1vm/README.md | 2 +- o1vm/run-code.sh | 4 ++-- o1vm/run-vm.sh | 5 +++-- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/o1vm-ci.yml b/.github/workflows/o1vm-ci.yml index 0e49282b7b..e2858480c5 100644 --- a/.github/workflows/o1vm-ci.yml +++ b/.github/workflows/o1vm-ci.yml @@ -4,12 +4,30 @@ on: workflow_dispatch: pull_request: paths: - - "o1vm/**" + [ + "o1vm/**", + "folding/**", + "groupmap/**", + "kimchi/**", + "msm/**", + "curves/**", + "poseidon/**", + "poly-commitment/", + ] push: branches: - master paths: - - "o1vm/**" + [ + "o1vm/**", + "folding/**", + "groupmap/**", + "kimchi/**", + "msm/**", + "curves/**", + "poseidon/**", + "poly-commitment/", + ] env: # https://doc.rust-lang.org/cargo/reference/profiles.html#release @@ -93,4 +111,4 @@ jobs: eval $(opam env) cd o1vm unzip -q -o /tmp/o1vm-e2e-testing-cache.zip -d ./ - FILENAME="env-for-latest-l2-block.sh" O1VM_FLAVOR="pickles" STOP_AT="=3000000" ./run-code.sh + RUN_WITH_CACHED_DATA="y" FILENAME="env-for-latest-l2-block.sh" O1VM_FLAVOR="pickles" STOP_AT="=3000000" ./run-code.sh diff --git a/o1vm/README.md b/o1vm/README.md index 4bd7f27f67..0a7cc6540b 100644 --- a/o1vm/README.md +++ b/o1vm/README.md @@ -165,7 +165,7 @@ python3 -m http.server 8765 & - Then run the o1vm with the following command: ```shell -FILENAME="env-for-latest-l2-block.sh" O1VM_FLAVOR="pickles" STOP_AT="=3000000" ./run-code.sh +RUN_WITH_CACHED_DATA="y" FILENAME="env-for-latest-l2-block.sh" O1VM_FLAVOR="pickles" STOP_AT="=3000000" ./run-code.sh ``` - Don't forget to stop the HTTP server after you are done. diff --git a/o1vm/run-code.sh b/o1vm/run-code.sh index 588aaf0b07..8753acf2c5 100755 --- a/o1vm/run-code.sh +++ b/o1vm/run-code.sh @@ -10,8 +10,8 @@ set -u source $FILENAME -if [ -d "op-program-db-for-latest-l2-block" ] && [ -f "env-for-latest-l2-block.sh" ] && [ -f "snapshot-state-3000000.json" ] && [ -f "meta.json" ]; then - echo "The Op-Program and the Cannon apps were not executed because of the cache data presence" +if [ "${RUN_WITH_CACHED_DATA:-}" == "y" ]; then + echo "The Op-Program and the Cannon apps were not executed because the cached data usage was requested" else ./run-op-program.sh ./run-cannon.sh diff --git a/o1vm/run-vm.sh b/o1vm/run-vm.sh index 7615286bef..34e61f4da7 100755 --- a/o1vm/run-vm.sh +++ b/o1vm/run-vm.sh @@ -18,7 +18,8 @@ O1VM_FLAVOR to one of these values to run the flavor you would like" ;; esac -if [ -d "op-program-db-for-latest-l2-block" ] && [ -f "snapshot-state-3000000.json" ]; then +if [ "${RUN_WITH_CACHED_DATA:-}" == "y" ]; then + echo "Setting the environment variables to use the cached data" export OP_PROGRAM_DATA_DIR="$(pwd)/op-program-db-for-latest-l2-block" export ZKVM_STATE_FILENAME="$(pwd)/snapshot-state-3000000.json" # We need to set the L1 and L2 RPC endpoints for op-program to run successfully @@ -26,7 +27,7 @@ if [ -d "op-program-db-for-latest-l2-block" ] && [ -f "snapshot-state-3000000.js export L2_RPC="http://localhost:8765" fi -RUST_BACKTRACE=full cargo run --bin ${BINARY_FLAVOR} \ +cargo run --bin ${BINARY_FLAVOR} \ --all-features \ --release \ -p o1vm -- \