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.
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, 500M)
- Multi-zkVM Support: Compare opcode costs across RISC0 and SP1 zkVMs
- Resource Metrics: Comprehensive measurement of cycles, memory usage, and proving time
- Automated Workflows: Scripts for fixture download, generation, profiling execution, and results analysis
Quick Start
-
Clone and Setup the Repository
git clone https://github.com/NethermindEth/zkevm-benchmark-workload/ cd zkevm-benchmark-workload/ git checkout profiling -
Download and Extract Fixtures
./scripts/download-and-extract-fixtures.sh zkevm@v0.1.0 -
Generate Gas-Categorized Fixtures
./scripts/generate-gas-categorized-fixtures.sh -
Run OPCODE Profiling
# Run on all gas categories ./scripts/run-gas-categorized-benchmarks.sh # Or run on a single fixture file ./scripts/run-single-file-benchmark.sh ./fixtures/block_12345.json -
Analyze Resource Requirements
./scripts/generate_results.sh --compare --statistics
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
- Scripts - Comprehensive documentation for all automation scripts
- Gas Categorized Fixtures - Learn how to generate test fixtures for opcode profiling
- Gas Categorized Benchmarks - Run opcode profiling across different gas categories
- Single File Benchmark - Run benchmarks on individual fixture files
- Markdown Tables - Generate and analyze resource requirement results
- Simplified Naming - Understand the test file naming scheme
- Benchmark Results - View and organize generated profiling results