Skip to content

Instantly share code, notes, and snippets.

@sifnoc
Created March 19, 2024 08:59
Show Gist options
  • Save sifnoc/9a85772e3a5f9784a6b0197feb906246 to your computer and use it in GitHub Desktop.
Save sifnoc/9a85772e3a5f9784a6b0197feb906246 to your computer and use it in GitHub Desktop.
Summa benchmark for comparison
// commit: 088ef520ab2c00e5fdabc81c7ede51e06281c777
// Test branch: v1-update-benchmark https://github.com/sifnoc/summa-solvency/tree/v1-update-benchmark
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> src/lib.rs:4:12
|
4 | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: `summa-solvency` (lib) generated 1 warning
warning: `summa-solvency` (lib test) generated 1 warning (1 duplicate)
Compiling summa-solvency v0.1.0 (/home/ubuntu/summa-solvency/zk_prover)
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> benches/full_solvency_flow.rs:1:12
|
1 | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: unused variable: `vk`
--> benches/full_solvency_flow.rs:108:19
|
108 | |(pk, vk, circuit, instances)| {
| ^^ help: if this is intentional, prefix it with an underscore: `_vk`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `circuit`
--> benches/full_solvency_flow.rs:128:26
|
128 | |(vk, proof, circuit, instances)| {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_circuit`
warning: `summa-solvency` (bench "full_solvency_flow") generated 3 warnings (run `cargo fix --bench "full_solvency_flow"` to apply 2 suggestions)
Finished bench [optimized] target(s) in 13.36s
Running unittests src/lib.rs (target/release/deps/summa_solvency-d40a054c7143f693)
running 29 tests
test chips::range::tests::testing::test_none_overflow_16bits ... ignored
test chips::range::tests::testing::test_overflow_16bits ... ignored
test chips::range::tests::testing::test_overflow_32bits ... ignored
test chips::range::utils::testing::test_decompose_fp_to_bytes_no_padding ... ignored
test chips::range::utils::testing::test_decompose_fp_to_bytes_overflow ... ignored
test chips::range::utils::testing::test_decompose_fp_to_bytes_overflow_2 ... ignored
test chips::range::utils::testing::test_decompose_fp_to_bytes_padding ... ignored
test chips::range::utils::testing::test_fp_to_big_uint ... ignored
test chips::range::utils::testing::test_pow_2 ... ignored
test circuits::tests::test::test_balance_not_in_range ... ignored
test circuits::tests::test::test_invalid_entry_balance_as_witness ... ignored
test circuits::tests::test::test_invalid_leaf_hash_as_instance ... ignored
test circuits::tests::test::test_invalid_root_hash ... ignored
test circuits::tests::test::test_invalid_root_hash_as_instance_with_full_prover ... ignored
test circuits::tests::test::test_non_binary_index ... ignored
test circuits::tests::test::test_swapping_index ... ignored
test circuits::tests::test::test_valid_merkle_sum_tree ... ignored
test circuits::tests::test::test_valid_merkle_sum_tree_with_full_prover ... ignored
test merkle_sum_tree::tests::test::get_leaf_node_hash_preimage ... ignored
test merkle_sum_tree::tests::test::get_middle_node_hash_preimage ... ignored
test merkle_sum_tree::tests::test::test_big_uint_conversion ... ignored
test merkle_sum_tree::tests::test::test_mst ... ignored
test merkle_sum_tree::tests::test::test_sorted_mst ... ignored
test merkle_sum_tree::tests::test::test_tree_with_zero_element_1 ... ignored
test merkle_sum_tree::tests::test::test_tree_with_zero_element_2 ... ignored
test merkle_sum_tree::tests::test::test_update_invalid_mst_leaf ... ignored
test merkle_sum_tree::tests::test::test_update_mst_leaf ... ignored
test merkle_sum_tree::utils::dummy_entries::tests::test_asset_not_zero ... ignored
test merkle_sum_tree::utils::dummy_entries::tests::test_generate_random_entries ... ignored
test result: ok. 0 passed; 0 failed; 29 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running benches/full_solvency_flow.rs (target/release/deps/full_solvency_flow-7dc0c49d1f2be5bd)
WARNING: HTML report generation will become a non-default optional feature in Criterion.rs 0.4.0.
This feature is being moved to cargo-criterion (https://github.com/bheisler/cargo-criterion) and will be optional in a future version of Criterion.rs. To silence this warning, either switch to cargo-criterion or enable the 'html_reports' feature in your Cargo.toml.
Gnuplot not found, using plotters backend
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate merkle proof
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate merkle proof: Warming up for 3.0000 s
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate merkle proof: Collecting 10 samples in estimated 5.0024 s (52k iterations)
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate merkle proof: Analyzing
K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate merkle proof
time: [96.281 µs 96.307 µs 96.348 µs]
Start: None Creating params
End: None Creating params ......................................................9.450s
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen verification key
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen verification key: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 30.4s.
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen verification key: Collecting 10 samples in estimated 30.439 s (10 iterations)
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen verification key: Analyzing
K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen verification key
time: [3.0286 s 3.0396 s 3.0516 s]
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen proving key
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen proving key: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 109.7s.
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen proving key: Collecting 10 samples in estimated 109.74 s (10 iterations)
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen proving key: Analyzing
K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - gen proving key
time: [10.862 s 10.891 s 10.922 s]
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate inclusion zk proof
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate inclusion zk proof: Warming up for 3.0000 s
Start: Creating proof
End: Creating proof ............................................................21.221s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 227.5s.
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate inclusion zk proof: Collecting 10 samples in estimated 227.53 s (10 iterations)
Start: Creating proof
End: Creating proof ............................................................21.344s
Start: Creating proof
End: Creating proof ............................................................21.321s
Start: Creating proof
End: Creating proof ............................................................21.340s
Start: Creating proof
End: Creating proof ............................................................21.287s
Start: Creating proof
End: Creating proof ............................................................21.254s
Start: Creating proof
End: Creating proof ............................................................21.363s
Start: Creating proof
End: Creating proof ............................................................21.336s
Start: Creating proof
End: Creating proof ............................................................21.310s
Start: Creating proof
End: Creating proof ............................................................21.286s
Start: Creating proof
End: Creating proof ............................................................21.337s
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate inclusion zk proof: Analyzing
K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - generate inclusion zk proof
time: [21.416 s 21.438 s 21.458 s]
Start: Creating proof
End: Creating proof ............................................................21.174s
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - verify inclusion zk proof
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - verify inclusion zk proof: Warming up for 3.0000 s
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - verify inclusion zk proof: Collecting 10 samples in estimated 5.0670 s (165 iterations)
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - verify inclusion zk proof: Analyzing
K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - verify inclusion zk proof
time: [4.8570 ms 4.8765 ms 4.9149 ms]
Found 1 outliers among 10 measurements (10.00%)
1 (10.00%) high mild
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - build merkle sum tree
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - build merkle sum tree: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 4229.0s.
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - build merkle sum tree: Collecting 10 samples in estimated 4229.0 s (10 iterations)
Benchmarking K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - build merkle sum tree: Analyzing
K = 19, LEVELS = 18, N_USERS = 262138, N_CURRENCIES = 175 - build merkle sum tree
time: [420.85 s 421.04 s 421.23 s]
Found 3 outliers among 10 measurements (30.00%)
2 (20.00%) low severe
1 (10.00%) high severe
// commit: 4a4ee35f5ac1d6b376f4a7efa4c2f06ef2b58759
// Test branch: v2-latest-benchmark https://github.com/sifnoc/summa-solvency/tree/v2-latest-benchmark
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> src/lib.rs:4:12
|
4 | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: `summa-solvency` (lib) generated 1 warning
warning: `summa-solvency` (lib test) generated 1 warning (1 duplicate)
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> bin/gen_commit_and_proofs.rs:1:12
|
1 | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> bin/gen_verifier.rs:1:12
|
1 | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default
Compiling summa-solvency v0.2.0 (/home/ubuntu/summa-solvency/kzg_prover)
warning: `summa-solvency` (bin "generate_commitment_and_proofs" test) generated 1 warning
warning: `summa-solvency` (bin "generate_verifier") generated 1 warning
warning: `summa-solvency` (bin "generate_verifier" test) generated 1 warning (1 duplicate)
warning: `summa-solvency` (bin "generate_commitment_and_proofs") generated 1 warning (1 duplicate)
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> benches/kzg.rs:1:12
|
1 | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: unused imports: `compute_h_parallel`, `open_all_user_points_amortized`, `open_single_user_point_amortized`
--> benches/kzg.rs:15:13
|
15 | compute_h_parallel, full_prover, generate_setup_artifacts,
| ^^^^^^^^^^^^^^^^^^
16 | open_all_user_points_amortized, open_grand_sums, open_grand_sums_gwc,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 | open_single_user_point_amortized, open_user_points, verify_grand_sum_openings,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused variable: `calculate_h_bench_name`
--> benches/kzg.rs:43:9
|
43 | let calculate_h_bench_name =
| ^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_calculate_h_bench_name`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `amortized_opening_all_bench_name`
--> benches/kzg.rs:45:9
|
45 | let amortized_opening_all_bench_name = format!(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_amortized_opening_all_bench_name`
warning: unused variable: `amortized_opening_user_bench_name`
--> benches/kzg.rs:49:9
|
49 | let amortized_opening_user_bench_name = format!(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_amortized_opening_user_bench_name`
warning: `summa-solvency` (bench "kzg") generated 5 warnings (run `cargo fix --bench "kzg"` to apply 4 suggestions)
Finished bench [optimized] target(s) in 11.73s
Running unittests src/lib.rs (target/release/deps/summa_solvency-b3330c95d4819701)
running 20 tests
test chips::range::tests::testing::test_none_overflow_64bits ... ignored
test chips::range::tests::testing::test_overflow_64bits ... ignored
test chips::range::utils::testing::test_decompose_fp_byte_pairs_no_padding ... ignored
test chips::range::utils::testing::test_decompose_fp_to_byte_pairs_overflow ... ignored
test chips::range::utils::testing::test_decompose_fp_to_byte_pairs_padding ... ignored
test chips::range::utils::testing::test_decompose_fp_to_bytes_no_padding ... ignored
test chips::range::utils::testing::test_decompose_fp_to_bytes_overflow ... ignored
test chips::range::utils::testing::test_decompose_fp_to_bytes_overflow_2 ... ignored
test chips::range::utils::testing::test_decompose_fp_to_bytes_padding ... ignored
test chips::range::utils::testing::test_fp_to_big_uint ... ignored
test chips::range::utils::testing::test_pow_2 ... ignored
test circuits::tests::test::test_amortized_kzg ... ignored
test circuits::tests::test::test_balance_not_in_range ... ignored
test circuits::tests::test::test_invalid_instance_value_univariate_grand_sum_prover ... ignored
test circuits::tests::test::test_invalid_omega_univariate_grand_sum_proof ... ignored
test circuits::tests::test::test_invalid_poly_length_univariate_grand_sum_full_prover ... ignored
test circuits::tests::test::test_valid_univariate_grand_sum_full_prover ... ignored
test circuits::tests::test::test_valid_univariate_grand_sum_prover ... ignored
test utils::dummy_entries::tests::test_asset_not_zero ... ignored
test utils::dummy_entries::tests::test_generate_random_entries ... ignored
test result: ok. 0 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests bin/gen_commit_and_proofs.rs (target/release/deps/generate_commitment_and_proofs-324e0c76d284c077)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests bin/gen_verifier.rs (target/release/deps/generate_verifier-5504f2da113660c3)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running benches/kzg.rs (target/release/deps/kzg-c8806350ab960849)
WARNING: HTML report generation will become a non-default optional feature in Criterion.rs 0.4.0.
This feature is being moved to cargo-criterion (https://github.com/bheisler/cargo-criterion) and will be optional in a future version of Criterion.rs. To silence this warning, either switch to cargo-criterion or enable the 'html_reports' feature in your Cargo.toml.
Gnuplot not found, using plotters backend
Start: None Creating params
End: None Creating params ......................................................4.750s
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> range check
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> range check: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 25605.1s.
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> range check: Collecting 10 samples in estimated 25605 s (10 iterations)
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> range check: Analyzing
<K = 18, N_USERS = 262138, N_CURRENCIES = 175> range check
time: [2563.2 s 2569.2 s 2574.9 s]
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 6.2s.
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum: Collecting 10 samples in estimated 6.1967 s (10 iterations)
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum: Analyzing
<K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum
time: [613.74 ms 624.48 ms 638.21 ms]
Found 1 outliers among 10 measurements (10.00%)
1 (10.00%) high mild
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum gwc
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum gwc: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 8.7s.
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum gwc: Collecting 10 samples in estimated 8.6776 s (10 iterations)
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum gwc: Analyzing
<K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening grand sum gwc
time: [860.62 ms 865.42 ms 870.85 ms]
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening single user inclusion
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening single user inclusion: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 6.2s.
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening single user inclusion: Collecting 10 samples in estimated 6.2334 s (10 iterations)
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening single user inclusion: Analyzing
<K = 18, N_USERS = 262138, N_CURRENCIES = 175> opening single user inclusion
time: [614.25 ms 623.11 ms 632.09 ms]
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying grand sum
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying grand sum: Warming up for 3.0000 s
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying grand sum: Collecting 10 samples in estimated 5.0560 s (1265 iterations)
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying grand sum: Analyzing
<K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying grand sum
time: [3.9927 ms 3.9942 ms 3.9958 ms]
Found 1 outliers among 10 measurements (10.00%)
1 (10.00%) low severe
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying user inclusion
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying user inclusion: Warming up for 3.0000 s
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying user inclusion: Collecting 10 samples in estimated 5.0227 s (1265 iterations)
Benchmarking <K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying user inclusion: Analyzing
<K = 18, N_USERS = 262138, N_CURRENCIES = 175> verifying user inclusion
time: [3.9622 ms 3.9688 ms 3.9773 ms]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment