Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ repository = "https://github.com/scroll-tech/scroll"
version = "4.5.8"

[workspace.dependencies]
scroll-zkvm-prover-euclid = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2962428", package = "scroll-zkvm-prover" }
scroll-zkvm-verifier-euclid = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2962428", package = "scroll-zkvm-verifier" }
scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "2962428" }
scroll-zkvm-prover-euclid = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "0dd7b19", package = "scroll-zkvm-prover" }
scroll-zkvm-verifier-euclid = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "0dd7b19", package = "scroll-zkvm-verifier" }
scroll-zkvm-types = { git = "https://github.com/scroll-tech/zkvm-prover", rev = "0dd7b19" }

sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/upgrade", features = ["scroll"] }
sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/upgrade" }
Expand Down
45 changes: 45 additions & 0 deletions crates/gpu_override/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

# [patch."https://github.com/openvm-org/openvm.git"]
# openvm-build = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-circuit = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-continuations = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-instructions ={ git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-native-circuit = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-native-compiler = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-native-recursion = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-native-transpiler = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-rv32im-transpiler = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }
# openvm-sdk = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false, features = ["parallel", "bench-metrics", "evm-prove"] }
# openvm-transpiler = { git = "ssh://[email protected]/scroll-tech/openvm-gpu.git", branch = "patch-v1.2.1-rc.1-pipe", default-features = false }

[patch."https://github.com/openvm-org/stark-backend.git"]
openvm-stark-backend = { git = "ssh://[email protected]/scroll-tech/openvm-stark-gpu.git", branch = "sync/upstream-250702", features = ["gpu"] }
openvm-stark-sdk = { git = "ssh://[email protected]/scroll-tech/openvm-stark-gpu.git", branch = "sync/upstream-250702", features = ["gpu"] }

[patch."https://github.com/Plonky3/Plonky3.git"]
p3-air = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-field = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-commit = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-matrix = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-baby-bear = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", features = [
"nightly-features",
], rev = "450ec18" }
p3-koala-bear = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-util = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-challenger = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-dft = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-fri = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-goldilocks = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-keccak = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-keccak-air = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-blake3 = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-mds = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-merkle-tree = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-monty-31 = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-poseidon = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-poseidon2 = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-poseidon2-air = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-symmetric = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-uni-stark = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
p3-maybe-rayon = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" } # the "parallel" feature is NOT on by default to allow single-threaded benchmarking
p3-bn254-fr = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", rev = "450ec18" }
32 changes: 0 additions & 32 deletions crates/prover-bin/.cargo/config.toml

This file was deleted.

4 changes: 3 additions & 1 deletion zkvm-prover/.work/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
*.vmexe
openvm.toml
*.bin
*.sol
cache
db
*.json
?
?
root-verifier*
35 changes: 0 additions & 35 deletions zkvm-prover/.work/batch/openvm.toml

This file was deleted.

17 changes: 0 additions & 17 deletions zkvm-prover/.work/bundle/openvm.toml

This file was deleted.

58 changes: 0 additions & 58 deletions zkvm-prover/.work/chunk/openvm.toml

This file was deleted.

31 changes: 21 additions & 10 deletions zkvm-prover/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endif
ZKVM_COMMIT=$(shell echo ${ZKVM_VERSION} | cut -d " " -f2)
$(info ZKVM_COMMIT is ${ZKVM_COMMIT})

PLONKY3_GPU_VERSION=$(shell ./print_plonky3gpu_version.sh | sed -n '2p')
#PLONKY3_GPU_VERSION=$(shell ./print_plonky3gpu_version.sh | sed -n '2p')

GIT_REV=$(shell git rev-parse --short HEAD)
GO_TAG=$(shell grep "var tag = " ../common/version/version.go | cut -d "\"" -f2)
Expand All @@ -32,16 +32,27 @@ else
$(info GO_TAG is ${GO_TAG})
endif

ifeq (${PLONKY3_GPU_VERSION},)
# use plonky3 with CPU
ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_VERSION}
else
# use halo2_gpu
ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_GPU_VERSION}
endif
ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_VERSION}
#ifeq (${PLONKY3_GPU_VERSION},)
# # use plonky3 with CPU
# ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_VERSION}
#else
# # use gpu
# ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_GPU_VERSION}
#endif

prover_gpu:
cd ../crates/gpu_override && cargo tree >/dev/null
$(eval PLONKY3_GPU_VERSION:=$(shell ./print_plonky3gpu_version.sh | sed -n '2p'))
$(eval ZK_VERSION:=${ZKVM_COMMIT}-${PLONKY3_GPU_VERSION})
@echo "Updated ZK_VERSION to ${ZK_VERSION} after prover_gpu"

prover: prover_gpu
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cd ../crates/gpu_override && cargo build --release -p prover

prover_cpu:
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo build --release -p prover

prover:
GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cd ../crates/prover-bin && cargo build --release

tests_binary:
cargo clean && cargo test --release --no-run
Expand Down
26 changes: 21 additions & 5 deletions zkvm-prover/download-release.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
#!/bin/bash

# Define version mapping
declare -A VERSION_MAP
VERSION_MAP["euclid"]="0.4.3"
VERSION_MAP["feynman"]="0.5.0rc0"

# release version
if [ -z "${SCROLL_ZKVM_VERSION}" ]; then
SCROLL_ZKVM_VERSION=$($SHELL ./print_high_zkvm_version.sh | cut -d' ' -f1|cut -c2-)

# Check if first argument is provided and matches a known version name
if [ -n "$1" ] && [ -n "${VERSION_MAP[$1]}" ]; then
SCROLL_ZKVM_VERSION=${VERSION_MAP[$1]}
echo "Setting SCROLL_ZKVM_VERSION to ${SCROLL_ZKVM_VERSION} based on '$1' argument"
else
# Default version if no argument or not recognized
SCROLL_ZKVM_VERSION=0.5.0rc0
fi
fi

echo $SCROLL_ZKVM_VERSION

mkdir -p .work/chunk
mkdir -p .work/batch
mkdir -p .work/bundle

# chunk-circuit exe
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/chunk/app.vmexe -O .work/chunk/app.vmexe

wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/chunk/openvm.toml -O .work/chunk/openvm.toml
# batch-circuit exe
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/batch/app.vmexe -O .work/batch/app.vmexe

wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/batch/openvm.toml -O .work/batch/openvm.toml
# bundle-circuit exe
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/app.vmexe -O .work/bundle/app.vmexe
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/openvm.toml -O .work/bundle/openvm.toml

# bundle-circuit exe, legacy version, may not exist
wget https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/bundle/app_euclidv1.vmexe -O .work/bundle/app_euclidv1.vmexe || echo "legacy app not exist for $SCROLL_ZKVM_VERSION"