Skip to content

Add integration test #8

Merged
kevaundray merged 4 commits into
masterfrom
han/feature/e2e
Dec 16, 2025
Merged

Add integration test #8
kevaundray merged 4 commits into
masterfrom
han/feature/e2e

Conversation

@han0110

@han0110 han0110 commented Dec 16, 2025

Copy link
Copy Markdown
Collaborator
  • Remove the old e2e test
  • Add integration test stateless_validator, it downloads the compiled stateless validator guest from workload repo to run end-to-end zkboost API test. If RPC url is provided, it generates witness from latest block, otherwise it generate witness from an empty block.
  • On CI we skip the proving because it takes too long for CPU proving even a empty block on free runner (~40 mins, see https://github.com/eth-act/zkboost/actions/runs/20265841678)

Resolves #7


For those who are interested to play with, we can try :

cargo test --release --package zkboost-server --test stateless_validator --no-run
BINARY=$(find target/release/deps -name "stateless_validator-*" -type f -executable | head -n 1)

RUST_LOG=info \
  GITHUB_TOKEN=<github-token> \
  $BINARY \
  --zkvm sp1 \
  --resource cpu \
  --keep-workspace

Note that github token is needed because we'll download the compiled artifacts from the action of workload repo.

And it should keep workspace storing the downloaded compiled artifacts and the config (path to the workspace could be found in log like INFO stateless_validator: Keep server workspace at {path}), with the config we can restart the zkboost-server by:

cargo build --release --package zkboost-server

RUST_LOG=info \
  ERE_IMAGE_REGISTRY=ghcr.io/eth-act/ere \
  ./target/release/zkboost-server \
  --config <config-path> \
  --port 3001

@han0110
han0110 force-pushed the han/feature/e2e branch 6 times, most recently from a895caa to c62d036 Compare December 16, 2025 11:09
@han0110
han0110 marked this pull request as ready for review December 16, 2025 12:37
use std::sync::LazyLock;

/// Workload repo in format of `{org}/{repo}` e.g. `eth-act/zkevm-benchmark-workload`.
pub(crate) static WORKLOAD_REPO: LazyLock<String> = LazyLock::new(|| {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the zkevm-benchmark-workload source from dependency for convenience (in case we need to use a fork).

.unwrap_or_else(|| panic!("Failed to find repo of `benchmark-runner`"))
});

pub(crate) static WORKLOAD_PKG_VERSION: LazyLock<PackageVersion> = LazyLock::new(|| {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, read the pkg version from dep (tag or revision).

Ok(config_path.to_string_lossy().to_string())
}

async fn download_program(args: &Args, workspace: &Path) -> anyhow::Result<String> {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With tag we can download the compiled guests from release, but for revision we assume it has the Release Compiled Guests action ran, and we download the compiled guests from the artifact it uploaded (which should last for 90 days), hence requiring the github token.

let input_dir = workspace.join("input");
fs::create_dir_all(&input_dir).await?;

if let Some(rpc_url) = &args.rpc_url {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If RPC url is provided, download the latest block , otherwise use the EEST empty block for testing

@kevaundray
kevaundray merged commit 75779eb into master Dec 16, 2025
12 checks passed
@kevaundray

Copy link
Copy Markdown
Contributor

cc @developeruche

@han0110
han0110 deleted the han/feature/e2e branch January 14, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

End-to-end workflow

2 participants