Skip to content

babybear-labs/benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZK Benchmark Project

Overview

This repository hosts the source code and resources for benchmarking various Zero-Knowledge (ZK) proofs. It builds upon the original repositories of Halo2, RISC0, Nexus, SP1, Jolt, Circom, and Powdr with our implementations of proofs including but not limited to SHA256, Fibonacci, Poseidon operations.

Our aim is to benchmark the performance of these proofs, comparing them in terms of time, space, and other metrics. This comprehensive comparison will not only highlight the most popular ZK proofs and their implementations but also deepen our understanding of their inner workings, developer friendliness and proving systems.

Goals

  • Benchmark Operations:

    • Fibonacci: Variants 1, 10, 100, 1000, 10000
    • SHA256: Variants 32b, 1k, 10k Bytes
    • Poseidon: Variants 32b, 100b
  • Additional Benchmarks:

    • Arithmetic Operations: Addition, Subtraction, Multiplication, Division
    • Loop: Variants 10, 100, 1000
    • Hash Functions: Pederson, RPO, Keccak (Variants 1k, 10k Bytes)
    • Merkle Tree: Generation, Membership/Inclusion, Merge
    • nth Prime: Variants 1, 10, 100, 1000, 10000
    • Cryptographic Verifications: ECDSA, Elliptic Curve, BLS Verification, BLS Aggregation

Proving Systems

General overview of features of proving schemes

Screenshot 2024-11-22 at 3 44 30 PM

Metrics

  • Prover Time
  • Verifier Time
  • Prover Space
  • Verifier Space
  • Proof Size
  • Parallel Execution
  • CPU Usage
  • Memory Usage
  • Verifier Gas Consumption
  • Cycles Count
  • Developer Friendliness

Reports

The detailed reports can be found in the reports directory.

Report Summary

Detailed report has metrics for other variants and additional operations.

Fibonacci - 10000 th number
fib
SHA256 - 1 KB Input
SHA256
Poseidon - 32 Byte input
Poseidon

Benchmark Machine Specifications

  • Macbook M1 Pro: Core 8, Memory 8 GB
  • AlmaLinux 8.10: Core 16, Memory 32 GB, Disk 1 TB
  • Windows 11: Core 16, Memory 32 GB, Disk 1 TB
  • Intel(R): Core 4 - Memory 8GB
  • Macbook M2 Pro: Core 16, Memory 16 GB

Installation

Each project has its own README file with instructions on how to install the dependencies and run the benchmarks.

Roadmap

Please refer to the issues.

Contributors

This project is part of the ZK and Scaling Bootcamp organized by Encode club.

Other benchmarks

Acknowledgments

Special thanks to the ZK and Scaling Bootcamp team for organizing this event and providing us with the opportunity to learn and contribute to the ZK space.