Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export RUST_LOG
OPENVM_RUST_TOOLCHAIN ?= nightly-2025-08-18
export OPENVM_RUST_TOOLCHAIN

CENO_RUST_TOOLCHAIN ?= +nightly-2025-11-20
export CENO_RUST_TOOLCHAIN

# Set GPU config if GPU=1 is set
ifeq ($(GPU),1)
CARGO_CONFIG_FLAG = --features scroll-zkvm-integration/cuda
Expand Down Expand Up @@ -86,6 +89,28 @@ prove-zisk-chunk:
prove-zisk-chunk-cpu:
cd zisk && PATH="$$HOME/.zisk/bin:$$PATH" cargo run --release -p scroll-zkvm-zisk-prover-test -- --circuit chunk --prove --emulator

# ---- Ceno backend (see ceno/AGENTS.md) ----
CENO_PROVER_FEATURES ?= gpu,jemalloc,aot-x86_64,parallel
CENO_MAX_CELL_PER_SHARD ?= 1245708288
CENO_CARGO_ENV = CARGO_NET_GIT_FETCH_WITH_CLI=true
CENO_GPU_E2E_ENV = $(CENO_CARGO_ENV) RUSTFLAGS="-C target-feature=+avx2" JEMALLOC_SYS_WITH_MALLOC_CONF=retain:true,background_thread:true,metadata_thp:always,thp:always,dirty_decay_ms:10000,muzzy_decay_ms:10000,abort_conf:true RUST_MIN_STACK=536870912 CENO_EMULATOR_BACKEND=aot CENO_GPU_ENABLE_WITGEN=0 CENO_GPU_WITGEN=0 CENO_CONCURRENT_CHIP_PROVING=1 CENO_GPU_MEM_TRACKING=0 CENO_GPU_CACHE_LEVEL=1 CENO_GPU_JAGGED_RESHAPE_LOG_HEIGHT=23 CENO_GPU_LARGE_TASK_BOOKING_MARGIN_MB=3048 CENO_MAX_CELL_PER_SHARD=$(CENO_MAX_CELL_PER_SHARD)

build-guest-ceno:
cd ceno && $(CENO_CARGO_ENV) cargo run --release -p scroll-zkvm-build-guest-ceno -- --mode force
cd ceno && $(CENO_CARGO_ENV) RUSTFLAGS="-C target-feature=+avx2" JEMALLOC_SYS_WITH_MALLOC_CONF=retain:true,background_thread:true,metadata_thp:always,thp:always,dirty_decay_ms:10000,muzzy_decay_ms:10000,abort_conf:true cargo build --release -p scroll-zkvm-ceno-prover-test --features $(CENO_PROVER_FEATURES)

test-e2e-ceno-chunk:
@if [ "$(GPU)" != "1" ]; then echo "GPU=1 is required for Ceno GPU E2E"; exit 1; fi
cd ceno && $(CENO_GPU_E2E_ENV) cargo run --release -p scroll-zkvm-ceno-prover-test --features $(CENO_PROVER_FEATURES) -- --circuit chunk --gpu

test-e2e-ceno-batch:
@if [ "$(GPU)" != "1" ]; then echo "GPU=1 is required for Ceno GPU E2E"; exit 1; fi
cd ceno && $(CENO_GPU_E2E_ENV) cargo run --release -p scroll-zkvm-ceno-prover-test --features $(CENO_PROVER_FEATURES) -- --circuit batch --gpu

test-e2e-ceno-bundle:
@if [ "$(GPU)" != "1" ]; then echo "GPU=1 is required for Ceno GPU E2E"; exit 1; fi
cd ceno && $(CENO_GPU_E2E_ENV) cargo run --release -p scroll-zkvm-ceno-prover-test --features $(CENO_PROVER_FEATURES) -- --circuit bundle --gpu

# In-guest recursion PoC: prove the bundle stub, then verify that child proof inside
# the batch recursion guest via zisk-verifier. We use the prebuilt emulator (`-l`) because
# the ASM microservice path times out on this machine for tiny proofs.
Expand Down
3 changes: 3 additions & 0 deletions ceno/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target/
/releases/dev/ceno/*/app
/releases/dev/ceno/prover-test/
30 changes: 30 additions & 0 deletions ceno/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AGENTS.md - Ceno backend

This directory is an isolated Ceno Cargo workspace. Keep Ceno dependencies and patches here;
do not add Ceno crates to the root OpenVM workspace.

The workspace uses remote Ceno dependencies in `Cargo.toml`, isolated from the root OpenVM
workspace:

- `scroll-tech/ceno` on branch `master`.
- `scroll-tech/ceno-gpu` on branch `main`, via the `cuda_hal` patch. This may require
GitHub SSH access on fresh machines.

Build and validation commands:

```bash
cd ceno && cargo check --workspace --all-targets
make build-guest-ceno
GPU=1 make test-e2e-ceno-chunk
GPU=1 make test-e2e-ceno-batch
GPU=1 make test-e2e-ceno-bundle
```

`GPU=1` is required for E2E proof commands. CPU fallback is intentionally rejected so the
commands fail loudly when GPU proving is unavailable.

Artifact layout:

- `ceno/releases/dev/ceno/{chunk,batch,bundle}/app` - compiled Ceno guest ELFs.
- `ceno/releases/dev/ceno/prover-test/<circuit>/` - hints, app proofs, root proof,
verifying-key metadata, and public-output digests.
Loading
Loading