mirror of
https://github.com/logos-storage/zk-benchmarks.git
synced 2026-01-07 00:03:06 +00:00
readme and cfg files added
This commit is contained in:
parent
29472e63a6
commit
ac7eeb75cd
11
hash/plonky2/bench/README.md
Normal file
11
hash/plonky2/bench/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
Plonky2 Hash Circuit Benchmarking
|
||||
--------------------------------
|
||||
- The `plonky2/bench` contains the following hash circuit benchamrking code: sha256, keccak256 and poseidon.
|
||||
- The code for sha256 is taken from [plonky2-sha256](https://github.com/polymerdao/plonky2-sha256).
|
||||
- The keccak hash has two different implementation taken from [plonky2-keccak256](https://github.com/qope/plonky2-keccak256) and Polygon-zero [zk_evm](https://github.com/0xPolygonZero/zk_evm/tree/develop).
|
||||
- The `build.sh` script builds the whole code. You need rust nightly version to build the code. The script overrides the default rust version to nightly.
|
||||
- `run.sh` and `run_tree.sh` runs the benchmark. (`run.sh` for sha256, keccak, and keccak-polygon and `run_tree.sh` for poseidon)
|
||||
- Benchmarks can be parameterized using environment variables. By convention, we start the names of these environment variables with the `ZKBENCH_` prefix.
|
||||
- By default the `run.sh` will run the sha256 benchmark over 256 Bytes of data. other hashes can be run by settig the environment variables accordingly.
|
||||
- By default the `run_tree.sh` will run the poseidon benchmark over tree depth 4.
|
||||
- Additional files `bench.cfg` and `bench_tree.cfg` specifies the configurations and parameters.
|
||||
11
hash/plonky2/bench/bench.cfg
Normal file
11
hash/plonky2/bench/bench.cfg
Normal file
@ -0,0 +1,11 @@
|
||||
name: "Plonky2 hashes circuit benchmarking"
|
||||
author:
|
||||
timeout: 200
|
||||
params:
|
||||
[ HASH_TYPE: [ "sha256", "keccak", "keccak-polygon"]
|
||||
, INPUT_SIZE_BYTES: [ 256, 512, 1024, 2048 ]
|
||||
]
|
||||
tags: plonky2, $HASH_TYPE
|
||||
|
||||
comments:
|
||||
The benchmarks includes for sha256, keccak and poseidon hash.
|
||||
10
hash/plonky2/bench/bench_tree.cfg
Normal file
10
hash/plonky2/bench/bench_tree.cfg
Normal file
@ -0,0 +1,10 @@
|
||||
name: "Plonky2 hashes circuit benchmarking"
|
||||
author:
|
||||
timeout: 100
|
||||
params:
|
||||
[ HASH_TYPE_TREE: [ "poseidon"]
|
||||
, TREE_DEPTH: [ 2, 4, 8, 16 ]
|
||||
]
|
||||
tags: plonky2, $HASH_TYPE_TREE
|
||||
comments:
|
||||
The benchmarks includes for poseidon hash.
|
||||
@ -1,3 +1,5 @@
|
||||
// original source: https://github.com/0xPolygonZero/zk_evm/tree/develop
|
||||
|
||||
use evm_arithmetization::{
|
||||
keccak::keccak_stark::KeccakStark,
|
||||
prover::prove_single_table,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user