Skip to content

Commit a18fe06

Browse files
feat: openvm v0.3.0 (#1648)
Co-authored-by: Velaciela <[email protected]> Co-authored-by: colinlyguo <[email protected]>
1 parent 3ac69be commit a18fe06

File tree

13 files changed

+343
-291
lines changed

13 files changed

+343
-291
lines changed

.github/workflows/common.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
uses: Swatinem/rust-cache@v2
4343
with:
4444
workspaces: "common/libzkp/impl -> target"
45+
- name: Setup SSH for private repos
46+
uses: webfactory/[email protected]
47+
with:
48+
ssh-private-key: ${{ secrets.OPENVM_GPU_SSH_PRIVATE_KEY }}
4549
- name: Lint
4650
working-directory: 'common'
4751
run: |

.github/workflows/docker.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ jobs:
307307
REPOSITORY: coordinator-api
308308
run: |
309309
aws --region ${{ env.AWS_REGION }} ecr describe-repositories --repository-names ${{ env.REPOSITORY }} && : || aws --region ${{ env.AWS_REGION }} ecr create-repository --repository-name ${{ env.REPOSITORY }}
310+
- name: Setup SSH for private repos
311+
uses: webfactory/[email protected]
312+
with:
313+
ssh-private-key: ${{ secrets.OPENVM_GPU_SSH_PRIVATE_KEY }}
314+
- name: Run custom script
315+
run: |
316+
./build/dockerfiles/coordinator-api/init-openvm.sh
310317
- name: Build and push
311318
uses: docker/build-push-action@v3
312319
env:

build/dockerfiles/coordinator-api.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ RUN cargo chef prepare --recipe-path recipe.json
99
FROM chef as zkp-builder
1010
COPY ./common/libzkp/impl/rust-toolchain ./
1111
COPY --from=planner /app/recipe.json recipe.json
12+
# run ./build/dockerfiles/coordinator-api/init-openvm.sh to get openvm-gpu
13+
COPY ./build/dockerfiles/coordinator-api/openvm-gpu /openvm-gpu
14+
COPY ./build/dockerfiles/coordinator-api/gitconfig /root/.gitconfig
15+
COPY ./build/dockerfiles/coordinator-api/config.toml /root/.cargo/config.toml
1216
RUN cargo chef cook --release --recipe-path recipe.json
1317

1418
COPY ./common/libzkp/impl .
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# openvm
2+
# same order and features as zkvm-prover/Cargo.toml.gpu
3+
[patch."ssh://git@github.com/scroll-tech/openvm-gpu.git"]
4+
openvm = { path = "/openvm-gpu/crates/toolchain/openvm", default-features = false }
5+
openvm-algebra-complex-macros = { path = "/openvm-gpu/extensions/algebra/complex-macros", default-features = false }
6+
openvm-algebra-guest = { path = "/openvm-gpu/extensions/algebra/guest", default-features = false }
7+
openvm-bigint-guest = { path = "/openvm-gpu/extensions/bigint/guest", default-features = false }
8+
openvm-build = { path = "/openvm-gpu/crates/toolchain/build", default-features = false }
9+
openvm-circuit = { path = "/openvm-gpu/crates/vm", default-features = false }
10+
openvm-custom-insn = { path = "/openvm-gpu/crates/toolchain/custom_insn", default-features = false }
11+
openvm-continuations = { path = "/openvm-gpu/crates/continuations", default-features = false }
12+
openvm-ecc-guest = { path = "/openvm-gpu/extensions/ecc/guest", default-features = false }
13+
openvm-instructions ={ path = "/openvm-gpu/crates/toolchain/instructions", default-features = false }
14+
openvm-keccak256-guest = { path = "/openvm-gpu/extensions/keccak256/guest", default-features = false }
15+
openvm-native-circuit = { path = "/openvm-gpu/extensions/native/circuit", default-features = false }
16+
openvm-native-compiler = { path = "/openvm-gpu/extensions/native/compiler", default-features = false }
17+
openvm-native-recursion = { path = "/openvm-gpu/extensions/native/recursion", default-features = false }
18+
openvm-native-transpiler = { path = "/openvm-gpu/extensions/native/transpiler", default-features = false }
19+
openvm-pairing-guest = { path = "/openvm-gpu/extensions/pairing/guest", default-features = false }
20+
openvm-rv32im-guest = { path = "/openvm-gpu/extensions/rv32im/guest", default-features = false }
21+
openvm-rv32im-transpiler = { path = "/openvm-gpu/extensions/rv32im/transpiler", default-features = false }
22+
openvm-sdk = { path = "/openvm-gpu/crates/sdk", default-features = false, features = ["parallel", "bench-metrics"] }
23+
openvm-sha256-guest = { path = "/openvm-gpu/extensions/sha256/guest", default-features = false }
24+
openvm-transpiler = { path = "/openvm-gpu/crates/toolchain/transpiler", default-features = false }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[url "https://github.com/"]
2+
insteadOf = ssh://[email protected]/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -uex
3+
4+
OPENVM_GPU_COMMIT=dfa10b4
5+
6+
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)
7+
8+
# checkout openvm-gpu
9+
if [ ! -d $DIR/openvm-gpu ]; then
10+
git clone [email protected]:scroll-tech/openvm-gpu.git $DIR/openvm-gpu
11+
fi
12+
cd $DIR/openvm-gpu && git fetch && git checkout ${OPENVM_GPU_COMMIT}

0 commit comments

Comments
 (0)