zkcollective / zk-harness Goto Github PK
View Code? Open in Web Editor NEWBenchmarking framework for general purpose zero-knowledge proofs languages and libraries
Home Page: https://www.zk-bench.org/
License: MIT License
Benchmarking framework for general purpose zero-knowledge proofs languages and libraries
Home Page: https://www.zk-bench.org/
License: MIT License
Currently, we just use a bash script to perform the benchmarks. We should probably create a JavaScript runner and use a benchmarking framework
Update the JSON structure of inputs to contain more details.
Currently, the input JSONs contain only the input values for the circuits.
We might want to add a description field to describe the input, so we can improve the UI.
Old format:
{
"PreImage": "68656c6c6f20776f726c64",
"Hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
}
Proposed format:
{
"Description": {
"name": "X Bytes"
"order": 0
}
"PreImage": "68656c6c6f20776f726c64",
"Hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
}
@tumberger wdyt?
Currently, gnark-crypto is version v0.9.1.
We should update to v0.10.0, e.g. SHA-256 only works for Groth16 with gnark-crypto v0.9.1.
For evaluating e.g. SHA-256 performance for PLONK and PLONK-FRI the following works (as set in the develop branch of gnark):
gnark v0.7.2
gnark-crypto v0.10.1
The current Rust-based bench runner introduced in #9 serves as a good start, but is not generalized just yet. This should be refactored to be able to plug-and-play different frameworks for benchmarks.
currently, memory measurement for starky is not performed.
Reason - no implementation for serialization, the therefore fails with independent binaries and interrmediate serialization.
Time benchmark logic is sound.
I cannot reproduce the circom
benchmarks on my end because /usr/bin/time
is not behaving as expected for me; it does not recognize the options -h -l -o
. What version of time
works with the circom
benchmarks script? @StefanosChaliasos
In private conversations with @tumberger we discussed 2 ways of measuring memory usage:
in-language memory benchmarks: this would require most likely require usage of jemalloc, which means we need to depend on libc directly.
external tools: we could also use /usr/bin/time
or something like valgrind
.
If we decide on 2), the logic between the test runner<>benchmarks would have to be separated, since in the current runner we are doing other tasks like writing to CSV, etc. which means we may not get the most accurate results.
Hi! I want Nix build code so that I can more easily build this project and it can more easily be reproduced on other people's machines. I am interested in doing this issue as part of the Berkeley ZK hackathon.
To save multiple benchmark runs, we need to update the structure of the benchmarks directory to include a date or an incremental number.
Add a table with qualitative information for frameworks and curves supported by zk-Harness.
Currently, SHA-256 in starky is not included in the benchmarks.
There is a fork of plonky2 that includes sha256 in the starky src
directory (based on this previous fork that has been used in the benchmarks as published by celer network). However, there is no concrete test for correctness in this implementation.
Adding SHA-256 with a test for correctness for starky in the current set of benchmarks would be a great addition.
Merge with the zkalc backend for arithmetic / curve operations
time
command. This way, the comparison is not equal to libraries as we have the nodejs overhead. However, this will most probably be negligible for large benchmarks.In this paper Benchmarking ZK-Circuits in Circom:
We integrated the following signature schemes and hash functions into ZK-Harness: Poseidon, Pedersen, MiMC, SHA-256, ECDSA, EdDSA, Sparse Merkle Tree, Keccak-256, and Schnorr.
Is this already integrated or is it being integrated? Where can I find relevant content?
Add specification for benchmarking recursive SNARKs
Create a document with the expected inputs, parameters, and other specifics for each circuit:
I'm working on the zk-benchmarking track. For some circuits, MIMC specifically, they have parameters for the number of rounds that the circuit does a computation. See this Gnark implementation of MIMC for example:
Gnark has various versions of MIMC, while Circomlib has only 1 which is that the number of rounds must be 91.
Some circuits like EDDSA and SMT also have different variants because you can build them with different hash functions (pedersen, mimc, poseidon, blake2b) and it's unclear right now which variant to choose.
Having a document that lists the expected inputs and parameters for each circuit would help circuit builders create their circuits to conform to the standard.
Currently, there is no naming convention for filenames:
├── bellman
│ ├── bellman_bls12_381_exponentiate.csv
│ ├── bellman_bls12_381_sha256.csv
│ ├── jsons
│ └── memory
├── circom
│ ├── circom_exponentiate.csv
│ └── circom_sha256.csv
├── gnark
│ ├── groth16_exponentiate.csv
│ ├── groth16_sha256.csv
│ ├── plonk_exponentiate.csv
│ └── plonk_sha256.csv
├── halo2_pse
│ ├── halo2_pse_bn256_exponentiate.csv
│ ├── halo2_pse_bn256_sha256.csv
│ ├── jsons
│ └── memory
└── starky
├── jsons
├── memory
└── starky_goldilocks_exponentiate.csv
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.