Skip to content

Commit

Permalink
chore: update benches
Browse files Browse the repository at this point in the history
  • Loading branch information
enricobottazzi committed Jul 5, 2023
1 parent 5d012d2 commit 2856035
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions zk_prover/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions zk_prover/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This directory contains the Halo2 ZK circuit implementation for the Summa Proof

## Usage

To build and test the circuits, execute
To build, test and print the circuits, execute

```
cargo build
Expand Down Expand Up @@ -70,14 +70,14 @@ Run on MacBook Pro 2023, M2 Pro, 32GB RAM, 12 cores

For Merkle Sum Tree Proof of Inclusion circuit

| VK Gen | Pk Gen | Proof Generation | Proof Verification | Proof Size (bytes) |
| ------ | ------ | ---------------- | ------------------ | ------------------ |
| 172.09 ms (+33.3%) | 63.307 ms (+2.496%)| 285.14 ms (-72.45%) | 4.7232 ms (-40.07%) | 2752 (-73.61%) |
| VK Gen | Pk Gen | Proof Generation | Proof Verification | Proof Size (bytes) |
| ------------------ | ------------------- | ------------------- | ------------------- | ------------------ |
| 172.09 ms (+33.3%) | 63.307 ms (+2.496%) | 285.14 ms (-72.45%) | 4.7232 ms (-40.07%) | 2752 (-73.61%) |

For Proof of Solvency circuit

| VK Gen | Pk Gen | Proof Generation | Proof Verification | Proof Size (bytes) |
| ------ | ------ | ---------------- | ------------------ | ------------------ |
| 109.64 ms | 57.848 ms| 1.3231s | 6.9582 ms | 11520 |
| VK Gen | Pk Gen | Proof Generation | Proof Verification | Proof Size (bytes) |
| ------ | ------ | ---------------- | ------------------ | ------------------ |
| 77.363 ms (-29.44%) | 30.850 ms (-46.47%) | 145.50ms (-89%) | 4.5124 ms (-35.15%) | 2752 (-76.11%) |


8 changes: 4 additions & 4 deletions zk_prover/benches/full_solvency_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fn verify_zk_proof_mst_inclusion_circuit(_c: &mut Criterion) {
fn verification_key_gen_solvency_circuit(_c: &mut Criterion) {
let mut criterion = Criterion::default().sample_size(SAMPLE_SIZE);

let params: ParamsKZG<Bn256> = generate_setup_params(12);
let params: ParamsKZG<Bn256> = generate_setup_params(11);

let empty_circuit = SolvencyCircuit::<L, N_ASSETS, N_BYTES>::init_empty();

Expand All @@ -165,7 +165,7 @@ fn verification_key_gen_solvency_circuit(_c: &mut Criterion) {
fn proving_key_gen_solvency_circuit(_c: &mut Criterion) {
let mut criterion = Criterion::default().sample_size(SAMPLE_SIZE);

let params: ParamsKZG<Bn256> = generate_setup_params(12);
let params: ParamsKZG<Bn256> = generate_setup_params(11);

let empty_circuit = SolvencyCircuit::<L, N_ASSETS, N_BYTES>::init_empty();

Expand All @@ -184,7 +184,7 @@ fn proving_key_gen_solvency_circuit(_c: &mut Criterion) {
fn generate_zk_proof_solvency_circuit(_c: &mut Criterion) {
let mut criterion = Criterion::default().sample_size(SAMPLE_SIZE);

let params: ParamsKZG<Bn256> = generate_setup_params(12);
let params: ParamsKZG<Bn256> = generate_setup_params(11);

let empty_circuit = SolvencyCircuit::<L, N_ASSETS, N_BYTES>::init_empty();

Expand Down Expand Up @@ -217,7 +217,7 @@ fn generate_zk_proof_solvency_circuit(_c: &mut Criterion) {
fn verify_zk_proof_solvency_circuit(_c: &mut Criterion) {
let mut criterion = Criterion::default().sample_size(SAMPLE_SIZE);

let params: ParamsKZG<Bn256> = generate_setup_params(12);
let params: ParamsKZG<Bn256> = generate_setup_params(11);

let empty_circuit = SolvencyCircuit::<L, N_ASSETS, N_BYTES>::init_empty();

Expand Down

0 comments on commit 2856035

Please sign in to comment.