Skip to content
Merged
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
64 changes: 17 additions & 47 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", rev =
reth-stateless = { git = "https://github.com/paradigmxyz/reth", rev = "cfde951976bfa9100a6d9f806e06fb539ae25241" }

# ere
ere-common = { git = "https://github.com/eth-act/ere", tag = "v0.1.0" }
ere-dockerized = { git = "https://github.com/eth-act/ere", tag = "v0.1.0" }
ere-server = { git = "https://github.com/eth-act/ere", tag = "v0.1.0" }
ere-zkvm-interface = { git = "https://github.com/eth-act/ere", tag = "v0.1.0" }
ere-common = { git = "https://github.com/eth-act/ere", tag = "v0.3.0" }
ere-dockerized = { git = "https://github.com/eth-act/ere", tag = "v0.3.0" }
ere-server = { git = "https://github.com/eth-act/ere", tag = "v0.3.0" }
ere-zkvm-interface = { git = "https://github.com/eth-act/ere", tag = "v0.3.0" }

# ere-guests
stateless-validator-ethrex = { git = "https://github.com/eth-act/ere-guests", tag = "v0.4.0", features = ["host"] }
Expand Down
6 changes: 3 additions & 3 deletions crates/zkboost-ethereum/el-config/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::path::PathBuf;

use clap::Parser;
use ere_common::zkVMKind;
use ere_zkvm_interface::ProverResourceType;
use ere_zkvm_interface::ProverResource;
use tokio::fs;
use zkboost_ethereum_el_config::program::download_program;
use zkboost_ethereum_el_types::ElKind;
Expand Down Expand Up @@ -60,8 +60,8 @@ async fn main() -> anyhow::Result<()> {
zkvm: vec![zkVMConfig::Docker {
kind: args.zkvm,
resource: match args.resource.to_lowercase().as_str() {
"cpu" => ProverResourceType::Cpu,
"gpu" => ProverResourceType::Gpu,
"cpu" => ProverResource::Cpu,
"gpu" => ProverResource::Gpu,
_ => unreachable!(),
},
program_id: format!("{}-{}", args.el, args.zkvm).into(),
Expand Down
25 changes: 14 additions & 11 deletions crates/zkboost/server-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path::Path;

use anyhow::Context;
use ere_dockerized::zkVMKind;
use ere_zkvm_interface::ProverResourceType;
use ere_zkvm_interface::ProverResource;
use serde::{Deserialize, Serialize};
use zkboost_types::ProgramID;

Expand Down Expand Up @@ -91,7 +91,7 @@ pub enum zkVMConfig {
/// The kind of zkVM backend to use.
kind: zkVMKind,
/// The compute resource type for proving (CPU, GPU, or network).
resource: ProverResourceType,
resource: ProverResource,
/// Unique identifier for this program.
program_id: ProgramID,
/// Path to the compiled program binary.
Expand Down Expand Up @@ -129,7 +129,7 @@ impl zkVMConfig {
#[cfg(test)]
mod test {
use ere_dockerized::zkVMKind;
use ere_zkvm_interface::{NetworkProverConfig, ProverResourceType};
use ere_zkvm_interface::{ProverResource, RemoteProverConfig};

use crate::{Config, PathConfig, ProgramConfig, UrlConfig, zkVMConfig};

Expand All @@ -141,19 +141,19 @@ mod test {

[[zkvm]]
kind = "openvm"
resource = "cpu"
resource = { kind = "cpu" }
program_id = "openvm-test"
program = "openvm-test-elf"

[[zkvm]]
kind = "sp1"
resource = { endpoint = "http://localhost:3000", api_key = "secret" }
resource = { kind = "network", endpoint = "http://localhost:3000", api_key = "secret" }
program_id = "sp1-test"
program = { path = "sp1-test-elf" }

[[zkvm]]
kind = "zisk"
resource = "gpu"
resource = { kind = "gpu" }
program_id = "zisk-test"
program = { url = "http://artifact" }

Expand All @@ -176,18 +176,21 @@ mod test {
webhook_url: "http://localhost:3003/proofs"
zkvm:
- kind: openvm
resource: cpu
resource:
kind: cpu
program_id: openvm-test
program: openvm-test-elf
- kind: sp1
resource:
kind: network
endpoint: http://localhost:3000
api_key: secret
program_id: sp1-test
program:
path: sp1-test-elf
- kind: zisk
resource: gpu
resource:
kind: gpu
program_id: zisk-test
program:
url: http://artifact
Expand All @@ -207,13 +210,13 @@ mod test {
zkvm: vec![
zkVMConfig::Docker {
kind: zkVMKind::OpenVM,
resource: ProverResourceType::Cpu,
resource: ProverResource::Cpu,
program_id: "openvm-test".into(),
program: ProgramConfig::Path("openvm-test-elf".into()),
},
zkVMConfig::Docker {
kind: zkVMKind::SP1,
resource: ProverResourceType::Network(NetworkProverConfig {
resource: ProverResource::Network(RemoteProverConfig {
endpoint: "http://localhost:3000".to_string(),
api_key: Some("secret".to_string()),
}),
Expand All @@ -224,7 +227,7 @@ mod test {
},
zkVMConfig::Docker {
kind: zkVMKind::Zisk,
resource: ProverResourceType::Gpu,
resource: ProverResource::Gpu,
program_id: "zisk-test".into(),
program: ProgramConfig::Url(UrlConfig {
url: "http://artifact".to_string(),
Expand Down
6 changes: 3 additions & 3 deletions crates/zkboost/server/tests/stateless_validator/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use anyhow::bail;
use axum::{Json, Router, extract::State, http::StatusCode, routing::post};
use clap::Parser;
use ere_dockerized::zkVMKind;
use ere_zkvm_interface::ProverResourceType;
use ere_zkvm_interface::ProverResource;
use nix::sys::{prctl, signal::Signal};
use tempfile::tempdir;
use tokio::{process::Command, sync::mpsc, time::sleep};
Expand Down Expand Up @@ -95,8 +95,8 @@ async fn generate_config(
.await?;

let resource = match args.resource.to_lowercase().as_str() {
"cpu" => ProverResourceType::Cpu,
"gpu" => ProverResourceType::Gpu,
"cpu" => ProverResource::Cpu,
"gpu" => ProverResource::Gpu,
_ => bail!("Unsupported resource type: {}", args.resource),
};

Expand Down
2 changes: 1 addition & 1 deletion docker/example/observability/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# Add zkVM programs here. Example:
# [[zkvm]]
# kind = "sp1"
# resource = "cpu"
# resource = { kind = "cpu" }
# program_id = "my-program"
# program = "/path/to/elf"
24 changes: 17 additions & 7 deletions docker/example/testnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,28 @@ sequenceDiagram

1. Install [`yq`](https://github.com/mikefarah/yq). If you are on Ubuntu, you can install `yq` by running `snap install yq`.

## Build image with GPU acceleration
## (Optional) Build image locally with GPU acceleration

To make sure EWS can keep up with the testnet, we can build the `ere-server-zisk` image with GPU acceleration if it is available.
The pre-built ZisK prover image (`ghcr.io/eth-act/ere/ere-server-zisk:0.3.0-cuda`) supports Blackwell GPUs only (ZisK only supports single architecture codegen). If you have a Blackwell GPU, e.g. RTX 50 series or RTX PRO 6000, skip this section.

```
git clone --depth 1 --branch v0.1.0 https://github.com/eth-act/ere
Build the image with the compute capability of local GPU:

```bash
git clone --depth 1 --branch v0.3.0 https://github.com/eth-act/ere
cd ere
COMPUTE_CAP=$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader | head -1 | tr -d '.')
bash .github/scripts/build-image.sh --zkvm zisk --tag local --base --server --cuda --cuda-arch "sm_$COMPUTE_CAP"
CUDA_ARCH=$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader | head -1 | tr -d '.')
echo "Building for CUDA architecture: $CUDA_ARCH"
bash .github/scripts/build-image.sh \
--registry ghcr.io/eth-act/ere \
--zkvm zisk \
--tag 0.3.0-cuda \
--base \
--server \
--cuda \
--cuda-archs "$CUDA_ARCH"
```

This builds the image `ere-server-zisk:local-cuda`
This produces `ghcr.io/eth-act/ere/ere-server-zisk:0.3.0-cuda`, which is referenced by the `./docker/example/testnet/docker-compose.yml`.

## Start local testnet

Expand Down
Loading