Getting Started
Welcome to the zkGas profiling documentation! This guide will help you understand the project structure and get started with profiling the resources needed for proving different OPCODEs in zk environments.
Project Overview
zkGas profiling is a comprehensive framework for measuring and comparing the resources needed for proving different OPCODEs in zk environments. The project focuses on analyzing the computational costs, memory usage, and proving time required for various Ethereum opcodes across different gas categories and zkVM implementations. The stateless-executor guest program reduces the re-execution of an ethereum block and witness to the transaction level without the pre and post execution validation overhead. This makes the proving resources as close to the actual execution of the instructions as possible.
Key Features
- OPCODE Profiling: Detailed analysis of resource requirements for different Ethereum opcodes
- Gas-Categorized Analysis: Organize profiling data by gas limits (1M, 10M, 30M, 45M, 60M, 100M, 150M)
- Multi-zkVM Support: Compare opcode costs across RISC0, SP1, OpenVM, Pico, Zisk, and Airbender zkVMs
- Resource Metrics: Comprehensive measurement of cycles, memory usage, and proving time
- Automated Workflows: Scripts for fixture download, generation, profiling execution, and results analysis
- Docker-Based Compilation: All zkVMs use EreDockerized for consistent builds
Quick Start
Prerequisites
Ensure you have Docker, Rust (1.70+), Python 3.8+, and Git installed before proceeding.
4-Step Workflow
- Clone and Setup the Repository
git clone https://github.com/NethermindEth/zkevm-benchmark-workload.git
cd zkevm-benchmark-workload
git checkout master-se-docs-03 # Use this branch until merged to master- Download and Extract Fixtures
./scripts/download-and-extract-fixtures.sh- Generate Gas-Categorized Fixtures
./scripts/generate-gas-categorized-fixtures.sh- Run Benchmarks
# Run with defaults (risc0 zkVM, reth client, GPU)
./scripts/run-gas-categorized-benchmarks.sh
# Or customize your run
./scripts/run-gas-categorized-benchmarks.sh -z sp1 -e reth -c 1M,10MDefault Configuration
| Setting | Default Value |
|---|---|
| zkVM | risc0 |
| Execution Client | reth |
| Resource | gpu |
| Gas Categories | 1M, 10M, 30M, 45M, 60M, 100M, 150M |
| Action | prove |
Project Structure
zkGas-profiling/
├── scripts/ # Automation scripts
├── crates/ # Core Rust crates
├── ere-guests/ # zkVM guest programs
├── zkevm-fixtures-input-*/ # Generated test fixtures
├── zkevm-metrics-*/ # Raw profiling results
├── benchmark-results/ # Organized results and analysis reports
└── www/ # Documentation websiteResults Organization
The benchmark-results/ directory provides organized access to profiling results:
gas-categorized/: Results organized by gas categories (1M, 10M, 30M, etc.)zkvm-comparisons/: Results organized by zkVM implementations (RISC0, SP1, etc.)markdown-reports/: Human-readable analysis reports and comparisonsarchived/: Historical results for long-term analysis
Next Steps
Comprehensive Guides
- Stateless Executor Guide - Complete guide with TLDR, scripts reference, troubleshooting, and automation best practices
Workflow Documentation
- Download Fixtures - Download EEST test fixtures
- Gas Categorized Fixtures - Generate test fixtures by gas category
- Gas Categorized Benchmarks - Run benchmarks across gas categories
- Single File Benchmark - Run benchmarks on individual fixture files
Analysis & Reporting
- Scripts - Comprehensive documentation for all automation scripts
- Markdown Tables - Generate and analyze resource requirement results
- Compare SP1 vs RISC0 - Compare zkVM implementations
- Export Comparison CSV - Export data for external analysis
Reference
- Simplified Naming - Understand the test file naming scheme
- Benchmark Results - View and organize generated profiling results