Skip to content

brevis-network/SpaZK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpaZK

This repository contains the implementation of SpaZK.

Benchmarks and examples

We prepare the benchmarks for some basic blocks

  1. Sumcheck benchmarks. (sumcheck is migrated from Arkworks)
  • Run cargo bench -p sumcheck > logs/sc.txt.
  • To convert it into a table, run cat logs/sc.txt | python3 scripts/bench_info.py.
  1. PCS benchmarks. (pcs is migrated from Jolt)
  • Run cargo bench -p pcs > logs/pcs.txt.
  • To convert it into a table, run cat pcs.txt | python3 scripts/bench_info.py.

We also prepare the examples for linear layer implementations.

  1. Ternary matrix vector multiplication.
  • Run cargo run --release -p gkr --example ternary_matrix --features ark-std/print-trace > logs/ternary_matrix.txt.
  • To convert it into a table, run cat logs/ternary_matrix.txt | python3 sc_info.py
  1. Normal matrix vector multiplication.
  • Run cargo run --release -p gkr --example normal_matrix --features ark-std/print-trace > logs/normal_matrix.txt.
  • To convert it into a table, run cat logs/normal_matrix.txt | python3 sc_info.py.
  1. Ternary matrix vector multiplication implemented by GKR circuit.
  • Run cargo run --release -p gkr --example ternary_matrix_circuit --features ark-std/print-trace > logs/ternary_matrix_circuit.txt.
  • To convert it into a table, run cat logs/ternary_matrix_circuit.txt | python3 sc_info.py.
  1. Normal matrix vector multiplication implemented by GKR circuit.
  • Run cargo run --release -p gkr --example normal_matrix_circuit --features ark-std/print-trace > logs/normal_matrix_circuit.txt.
  • To convert it into a table, run cat logs/normal_matrix_circuit.txt | python3 sc_info.py

ZKML

We implement a simple example containing the linear layer, relu layer and ternary sparse linear layer. Run the following command to run the example:

cargo run -r -p zkml --example zkml --features ark-std/print-trace

Acknowledgement

The sumcheck package is modified from arkworks-rs/sumcheck and PCS is modified from a16z/jolt.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages