Skip to content

Commit 9f4c9ee

Browse files
authored
fix: prover version (#1611)
1 parent b30f4d0 commit 9f4c9ee

File tree

7 files changed

+43
-47
lines changed

7 files changed

+43
-47
lines changed

build/dockerfiles/prover.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
1212
ENV PATH="/root/.cargo/bin:${PATH}"
1313
ENV CARGO_HOME=/root/.cargo
1414

15-
COPY ./zkvm-prover .
15+
COPY . /src
1616

17-
RUN cargo build --release
17+
RUN cd /src/zkvm-prover && make prover
1818

1919
FROM ubuntu:24.04 AS runtime
2020

21-
COPY --from=builder /target/release/prover /usr/local/bin/
21+
COPY --from=builder /src/zkvm-prover/target/release/prover /usr/local/bin/
2222

2323
ENTRYPOINT ["prover"]

go.work.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp
434434
github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 h1:XMEdVDFxgulDDl0lQmAZS6j8gRQ/0pJ+ZpXH2FHVtDc=
435435
github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU=
436436
github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o=
437+
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
437438
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
438439
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
439440
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
@@ -1763,6 +1764,7 @@ gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=
17631764
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
17641765
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0=
17651766
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
1767+
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
17661768
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
17671769
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0=
17681770
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns=

zkvm-prover/Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
.PHONY: prover lint tests_binary
22

33
ifeq (4.3,$(firstword $(sort $(MAKE_VERSION) 4.3)))
4-
HALO2_VERSION=$(shell grep -m 1 "halo2.git" ./Cargo.lock | cut -d "#" -f2 | cut -c-7)
4+
PLONKY3_VERSION=$(shell grep -m 1 "Plonky3.git" ./Cargo.lock | cut -d "#" -f2 | cut -c-7)
55
else
6-
HALO2_VERSION=$(shell grep -m 1 "halo2.git" ./Cargo.lock | cut -d "\#" -f2 | cut -c-7)
6+
PLONKY3_VERSION=$(shell grep -m 1 "Plonky3.git" ./Cargo.lock | cut -d "\#" -f2 | cut -c-7)
77
endif
88

9-
ZKEVM_VERSION=$(shell ./print_high_zkevm_version.sh)
10-
ifeq (${ZKEVM_VERSION},)
11-
$(error ZKEVM_VERSION not set)
9+
ZKVM_VERSION=$(shell ./print_high_zkvm_version.sh)
10+
ifeq (${ZKVM_VERSION},)
11+
$(error ZKVM_VERSION not set)
1212
else
13-
$(info ZKEVM_VERSION is ${ZKEVM_VERSION})
13+
$(info ZKVM_VERSION is ${ZKVM_VERSION})
1414
endif
1515

16-
ZKEVM_COMMIT=$(shell echo ${ZKEVM_VERSION} | cut -d " " -f2)
17-
$(info ZKEVM_COMMIT is ${ZKEVM_COMMIT})
16+
ZKVM_COMMIT=$(shell echo ${ZKVM_VERSION} | cut -d " " -f2)
17+
$(info ZKVM_COMMIT is ${ZKVM_COMMIT})
1818

19-
HALO2_GPU_VERSION=$(shell ./print_halo2gpu_version.sh | sed -n '2p')
19+
PLONKY3_GPU_VERSION=$(shell ./print_plonky3gpu_version.sh | sed -n '2p')
2020

2121
GIT_REV=$(shell git rev-parse --short HEAD)
2222
GO_TAG=$(shell grep "var tag = " ../common/version/version.go | cut -d "\"" -f2)
@@ -27,12 +27,12 @@ else
2727
$(info GO_TAG is ${GO_TAG})
2828
endif
2929

30-
ifeq (${HALO2_GPU_VERSION},)
31-
# use halo2_proofs with CPU
32-
ZK_VERSION=${ZKEVM_COMMIT}-${HALO2_VERSION}
30+
ifeq (${PLONKY3_GPU_VERSION},)
31+
# use plonky3 with CPU
32+
ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_VERSION}
3333
else
3434
# use halo2_gpu
35-
ZK_VERSION=${ZKEVM_COMMIT}-${HALO2_GPU_VERSION}
35+
ZK_VERSION=${ZKVM_COMMIT}-${PLONKY3_GPU_VERSION}
3636
endif
3737

3838
prover:

zkvm-prover/print_halo2gpu_version.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

zkvm-prover/print_high_zkevm_version.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -ue
3+
4+
higher_zkvm_item=`grep "zkvm-prover" ./Cargo.lock | sort | uniq | awk -F "[#=]" '{print $3" "$4}' | sort -k 1 | tail -n 1`
5+
6+
higher_version=`echo $higher_zkvm_item | awk '{print $1}'`
7+
8+
higher_commit=`echo $higher_zkvm_item | cut -d ' ' -f2 | cut -c-7`
9+
10+
echo "$higher_version $higher_commit"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
config_file=~/.cargo/config.toml
4+
plonky3_gpu_path=$(grep 'path.*plonky3-gpu' "$config_file" | cut -d'"' -f2 | head -n 1)
5+
plonky3_gpu_path=$(dirname "$plonky3_gpu_path")
6+
7+
if [ -z $plonky3_gpu_path ]; then
8+
exit 0
9+
else
10+
pushd $plonky3_gpu_path
11+
commit_hash=$(git log --pretty=format:%h -n 1)
12+
echo "${commit_hash:0:7}"
13+
14+
popd
15+
fi

0 commit comments

Comments
 (0)