From 4dca26b0ca8a4a8f8a707885d3b2f924c2e95b7e Mon Sep 17 00:00:00 2001 From: Oyun <1340839769@qq.com> Date: Wed, 28 Aug 2024 19:15:30 +0800 Subject: [PATCH] bug: fix the timer of the benchmarks --- halo2-base/src/utils/testing.rs | 20 +- halo2-ecc/src/bn254/tests/combine_bls_mt.rs | 4 +- halo2-ecc/src/bn254/tests/ec_add.rs | 4 +- halo2-ecc/src/bn254/tests/fixed_base_msm.rs | 4 +- halo2-ecc/src/bn254/tests/merkle_tree.rs | 4 +- halo2-ecc/src/bn254/tests/msm.rs | 4 +- halo2-ecc/src/bn254/tests/pairing.rs | 4 +- halo2-ecc/src/secp256k1/tests/ecdsa.rs | 4 +- .../src/secp256k1/tests/schnorr_signature.rs | 4 +- result.txt | 125 ------- result2 copy.txt | 130 ------- result2.txt | 9 - result3.txt | 121 ------- result_combine.txt | 330 ------------------ result_mt.txt | 9 - 15 files changed, 30 insertions(+), 746 deletions(-) delete mode 100644 result.txt delete mode 100644 result2 copy.txt delete mode 100644 result2.txt delete mode 100644 result3.txt delete mode 100644 result_combine.txt delete mode 100644 result_mt.txt diff --git a/halo2-base/src/utils/testing.rs b/halo2-base/src/utils/testing.rs index a4608df..b4ddcea 100644 --- a/halo2-base/src/utils/testing.rs +++ b/halo2-base/src/utils/testing.rs @@ -1,4 +1,6 @@ //! Utilities for testing +use std::time::Duration; + use crate::{ gates::{ circuit::{builder::RangeCircuitBuilder, BaseCircuitParams, CircuitBuilderStage}, @@ -22,7 +24,7 @@ use crate::{ }, Context, }; -use ark_std::{end_timer, perf_trace::TimerInfo, start_timer}; +use ark_std::{end_timer, start_timer}; use rand::{rngs::StdRng, SeedableRng}; use super::fs::gen_srs; @@ -223,9 +225,12 @@ impl BaseTester { let vk_time = start_timer!(|| "Generating vkey"); let vk = keygen_vk(¶ms, &builder).unwrap(); end_timer!(vk_time); + let vk_duration = vk_time.time.elapsed(); + let pk_time = start_timer!(|| "Generating pkey"); let pk = keygen_pk(¶ms, vk, &builder).unwrap(); end_timer!(pk_time); + let pk_duration = pk_time.time.elapsed(); let break_points = builder.break_points(); drop(builder); @@ -236,14 +241,17 @@ impl BaseTester { f(builder.pool(0), &range, logic_input); let proof = gen_proof(¶ms, &pk, builder); end_timer!(proof_time); + let proof_duration = proof_time.time.elapsed(); let proof_size = proof.len(); let verify_time = start_timer!(|| "Verify time"); + let verify_start_time = std::time::Instant::now(); check_proof(¶ms, pk.get_vk(), &proof, self.expect_satisfied); + let verify_duration = verify_start_time.elapsed(); end_timer!(verify_time); - BenchStats { config_params, vk_time, pk_time, proof_time, proof_size, verify_time } + BenchStats { config_params, vk_time: vk_duration, pk_time: pk_duration, proof_time: proof_duration, proof_size, verify_time: verify_duration } } } @@ -252,13 +260,13 @@ pub struct BenchStats { /// Config params pub config_params: BaseCircuitParams, /// Vkey gen time - pub vk_time: TimerInfo, + pub vk_time: Duration, /// Pkey gen time - pub pk_time: TimerInfo, + pub pk_time: Duration, /// Proving time - pub proof_time: TimerInfo, + pub proof_time: Duration, /// Proof size in bytes pub proof_size: usize, /// Verify time - pub verify_time: TimerInfo, + pub verify_time: Duration, } diff --git a/halo2-ecc/src/bn254/tests/combine_bls_mt.rs b/halo2-ecc/src/bn254/tests/combine_bls_mt.rs index ebc8fd7..df5d3c5 100644 --- a/halo2-ecc/src/bn254/tests/combine_bls_mt.rs +++ b/halo2-ecc/src/bn254/tests/combine_bls_mt.rs @@ -226,9 +226,9 @@ fn bench_merkle_tree() -> Result<(), Box> { bench_params.num_limbs, bench_params.num_aggregation, bench_params.num_origin, - stats.proof_time.time.elapsed(), + stats.proof_time, stats.proof_size, - stats.verify_time.time.elapsed(), + stats.verify_time, )?; } Ok(()) diff --git a/halo2-ecc/src/bn254/tests/ec_add.rs b/halo2-ecc/src/bn254/tests/ec_add.rs index 1df235f..6f38410 100644 --- a/halo2-ecc/src/bn254/tests/ec_add.rs +++ b/halo2-ecc/src/bn254/tests/ec_add.rs @@ -102,9 +102,9 @@ fn bench_ec_add() -> Result<(), Box> { bench_params.limb_bits, bench_params.num_limbs, bench_params.batch_size, - stats.proof_time.time.elapsed(), + stats.proof_time, stats.proof_size, - stats.verify_time.time.elapsed() + stats.verify_time )?; } Ok(()) diff --git a/halo2-ecc/src/bn254/tests/fixed_base_msm.rs b/halo2-ecc/src/bn254/tests/fixed_base_msm.rs index 28466a8..a595f95 100644 --- a/halo2-ecc/src/bn254/tests/fixed_base_msm.rs +++ b/halo2-ecc/src/bn254/tests/fixed_base_msm.rs @@ -106,9 +106,9 @@ fn bench_fixed_base_msm() -> Result<(), Box> { bench_params.limb_bits, bench_params.num_limbs, bench_params.batch_size, - stats.proof_time.time.elapsed(), + stats.proof_time, stats.proof_size, - stats.verify_time.time.elapsed() + stats.verify_time, )?; } Ok(()) diff --git a/halo2-ecc/src/bn254/tests/merkle_tree.rs b/halo2-ecc/src/bn254/tests/merkle_tree.rs index 5545898..3727679 100644 --- a/halo2-ecc/src/bn254/tests/merkle_tree.rs +++ b/halo2-ecc/src/bn254/tests/merkle_tree.rs @@ -168,9 +168,9 @@ fn bench_merkle_tree() -> Result<(), Box> { bench_params.num_limbs, bench_params.num_aggregation, bench_params.num_origin, - stats.proof_time.time.elapsed(), + stats.proof_time, stats.proof_size, - stats.verify_time.time.elapsed(), + stats.verify_time, )?; } Ok(()) diff --git a/halo2-ecc/src/bn254/tests/msm.rs b/halo2-ecc/src/bn254/tests/msm.rs index 22ea8ee..c69dc44 100644 --- a/halo2-ecc/src/bn254/tests/msm.rs +++ b/halo2-ecc/src/bn254/tests/msm.rs @@ -103,9 +103,9 @@ fn bench_msm() -> Result<(), Box> { bench_params.num_limbs, bench_params.batch_size, bench_params.window_bits, - stats.proof_time.time.elapsed(), + stats.proof_time, stats.proof_size, - stats.verify_time.time.elapsed(), + stats.verify_time, )?; } Ok(()) diff --git a/halo2-ecc/src/bn254/tests/pairing.rs b/halo2-ecc/src/bn254/tests/pairing.rs index 55291bf..16e768d 100644 --- a/halo2-ecc/src/bn254/tests/pairing.rs +++ b/halo2-ecc/src/bn254/tests/pairing.rs @@ -97,9 +97,9 @@ fn bench_pairing() -> Result<(), Box> { bench_params.lookup_bits, bench_params.limb_bits, bench_params.num_limbs, - stats.proof_time.time.elapsed(), + stats.proof_time, stats.proof_size, - stats.verify_time.time.elapsed() + stats.verify_time, )?; } Ok(()) diff --git a/halo2-ecc/src/secp256k1/tests/ecdsa.rs b/halo2-ecc/src/secp256k1/tests/ecdsa.rs index a6dfd99..08a0eb5 100644 --- a/halo2-ecc/src/secp256k1/tests/ecdsa.rs +++ b/halo2-ecc/src/secp256k1/tests/ecdsa.rs @@ -137,9 +137,9 @@ fn bench_secp256k1_ecdsa() -> Result<(), Box> { bench_params.lookup_bits, bench_params.limb_bits, bench_params.num_limbs, - stats.proof_time.time.elapsed(), + stats.proof_time, stats.proof_size, - stats.verify_time.time.elapsed() + stats.verify_time, )?; } Ok(()) diff --git a/halo2-ecc/src/secp256k1/tests/schnorr_signature.rs b/halo2-ecc/src/secp256k1/tests/schnorr_signature.rs index 842a469..1107d1c 100644 --- a/halo2-ecc/src/secp256k1/tests/schnorr_signature.rs +++ b/halo2-ecc/src/secp256k1/tests/schnorr_signature.rs @@ -142,9 +142,9 @@ fn bench_secp256k1_schnorr() -> Result<(), Box> { bench_params.lookup_bits, bench_params.limb_bits, bench_params.num_limbs, - stats.proof_time.time.elapsed(), + stats.proof_time, stats.proof_size, - stats.verify_time.time.elapsed() + stats.verify_time, )?; } Ok(()) diff --git a/result.txt b/result.txt deleted file mode 100644 index 2a87ba1..0000000 --- a/result.txt +++ /dev/null @@ -1,125 +0,0 @@ - Finished test [optimized + debuginfo] target(s) in 0.16s - Running unittests src/lib.rs (target/debug/deps/halo2_ecc-ff458f914a36701b) - -running 1 test -test bn254::tests::combine_bls_mt::bench_merkle_tree has been running for over 60 seconds -test bn254::tests::combine_bls_mt::bench_merkle_tree ... FAILED - -successes: - -successes: - -failures: - ----- bn254::tests::combine_bls_mt::bench_merkle_tree stdout ---- ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 4823829 advice cells -Total 453 fixed cells -Total range check advice cells to lookup per phase: [531238, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -End: Generating vkey ...........................................................11.367s -Start: Generating pkey -End: Generating pkey ...........................................................5.806s -Start: Proving time -End: Proving time ..............................................................19.278s -Start: Verify time -End: Verify time ...............................................................15.553ms ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 5501717 advice cells -Total 453 fixed cells -Total range check advice cells to lookup per phase: [548518, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -End: Generating vkey ...........................................................12.402s -Start: Generating pkey -End: Generating pkey ...........................................................6.595s -Start: Proving time -End: Proving time ..............................................................20.331s -Start: Verify time -End: Verify time ...............................................................15.555ms ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 7001717 advice cells -Total 453 fixed cells -Total range check advice cells to lookup per phase: [583078, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -End: Generating vkey ...........................................................15.596s -Start: Generating pkey -End: Generating pkey ...........................................................8.605s -Start: Proving time -End: Proving time ..............................................................24.985s -Start: Verify time -End: Verify time ...............................................................17.133ms ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 10290165 advice cells -Total 453 fixed cells -Total range check advice cells to lookup per phase: [652198, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -End: Generating vkey ...........................................................24.041s -Start: Generating pkey -End: Generating pkey ...........................................................13.493s -Start: Proving time -End: Proving time ..............................................................36.515s -Start: Verify time -End: Verify time ...............................................................21.020ms ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 17443957 advice cells -Total 453 fixed cells -Total range check advice cells to lookup per phase: [790438, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -End: Generating vkey ...........................................................41.977s -Start: Generating pkey -End: Generating pkey ...........................................................24.769s -Start: Proving time -End: Proving time ..............................................................61.743s -Start: Verify time -End: Verify time ...............................................................32.022ms ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 32905333 advice cells -Total 453 fixed cells -Total range check advice cells to lookup per phase: [1066918, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -End: Generating vkey ...........................................................84.634s -Start: Generating pkey -End: Generating pkey ...........................................................50.786s -Start: Proving time -End: Proving time ..............................................................112.042s -Start: Verify time -End: Verify time ...............................................................55.634ms ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 66135669 advice cells -Total 453 fixed cells -Total range check advice cells to lookup per phase: [1619878, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -End: Generating vkey ...........................................................186.769s -Start: Generating pkey -End: Generating pkey ...........................................................140.619s -Start: Proving time -End: Proving time ..............................................................229.576s -Start: Verify time -End: Verify time ...............................................................120.613ms ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 137211509 advice cells -Total 453 fixed cells -Total range check advice cells to lookup per phase: [2725798, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -thread 'bn254::tests::combine_bls_mt::bench_merkle_tree' panicked at /home/wuyun/zk/halo2/halo2-lib/halo2-base/src/gates/flex_gate/threads/single_phase.rs:251:44: -NOT ENOUGH ADVICE COLUMNS. Perhaps blinding factors were not taken into account. The max non-poisoned rows is 65527 -note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace -[halo2-base/src/virtual_region/lookups.rs:117:13] "WARNING: LookupAnyManager was not assigned!" = "WARNING: LookupAnyManager was not assigned!" -[halo2-base/src/virtual_region/copy_constraints.rs:122:13] "WARNING: advice_equalities not empty" = "WARNING: advice_equalities not empty" -[halo2-base/src/virtual_region/copy_constraints.rs:125:13] "WARNING: constant_equalities not empty" = "WARNING: constant_equalities not empty" - - -failures: - bn254::tests::combine_bls_mt::bench_merkle_tree - -test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 41 filtered out; finished in 1420.49s - -error: test failed, to rerun pass `-p halo2-ecc --lib` diff --git a/result2 copy.txt b/result2 copy.txt deleted file mode 100644 index 057e1b6..0000000 --- a/result2 copy.txt +++ /dev/null @@ -1,130 +0,0 @@ -running 1 test -test bn254::tests::bls_signature::bench_bls_signature has been running for over 60 seconds -test bn254::tests::bls_signature::bench_bls_signature ... ok - -successes: - ----- bn254::tests::bls_signature::bench_bls_signature stdout ---- ----------------------- degree = 14 ------------------------------ -Gate Chip | Phase 0: 4539155 advice cells -Total 131 fixed cells -Total range check advice cells to lookup per phase: [597184, 0, 0] -read params from ./params/kzg_bn254_14.srs -Start: Generating vkey -End: Generating vkey ...........................................................14.223s -Start: Generating pkey -End: Generating pkey ...........................................................5.768s -Start: Proving time -End: Proving time ..............................................................19.548s -Start: Verify time -End: Verify time ...............................................................36.240ms ----------------------- degree = 15 ------------------------------ -Gate Chip | Phase 0: 4507651 advice cells -Total 133 fixed cells -Total range check advice cells to lookup per phase: [597956, 0, 0] -read params from ./params/kzg_bn254_15.srs -Start: Generating vkey -End: Generating vkey ...........................................................11.578s -Start: Generating pkey -End: Generating pkey ...........................................................5.438s -Start: Proving time -End: Proving time ..............................................................17.478s -Start: Verify time -End: Verify time ...............................................................22.528ms ----------------------- degree = 16 ------------------------------ -Gate Chip | Phase 0: 4295957 advice cells -Total 129 fixed cells -Total range check advice cells to lookup per phase: [516118, 0, 0] -read params from ./params/kzg_bn254_16.srs -Start: Generating vkey -End: Generating vkey ...........................................................10.193s -Start: Generating pkey -End: Generating pkey ...........................................................5.131s -Start: Proving time -End: Proving time ..............................................................16.417s -Start: Verify time -End: Verify time ...............................................................14.365ms ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 4276783 advice cells -Total 131 fixed cells -Total range check advice cells to lookup per phase: [521000, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................9.591s -Start: Generating pkey -End: Generating pkey ...........................................................5.063s -Start: Proving time -End: Proving time ..............................................................16.561s -Start: Verify time -End: Verify time ...............................................................11.176ms ----------------------- degree = 18 ------------------------------ -Gate Chip | Phase 0: 4243033 advice cells -Total 132 fixed cells -Total range check advice cells to lookup per phase: [509750, 0, 0] -read params from ./params/kzg_bn254_18.srs -Start: Generating vkey -End: Generating vkey ...........................................................9.376s -Start: Generating pkey -End: Generating pkey ...........................................................5.347s -Start: Proving time -End: Proving time ..............................................................18.737s -Start: Verify time -End: Verify time ...............................................................8.651ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 4082453 advice cells -Total 128 fixed cells -Total range check advice cells to lookup per phase: [444950, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................9.145s -Start: Generating pkey -End: Generating pkey ...........................................................5.540s -Start: Proving time -End: Proving time ..............................................................19.317s -Start: Verify time -End: Verify time ...............................................................7.699ms ----------------------- degree = 20 ------------------------------ -Gate Chip | Phase 0: 4083466 advice cells -Total 131 fixed cells -Total range check advice cells to lookup per phase: [456561, 0, 0] -read params from ./params/kzg_bn254_20.srs -Start: Generating vkey -End: Generating vkey ...........................................................9.831s -Start: Generating pkey -End: Generating pkey ...........................................................6.211s -Start: Proving time -End: Proving time ..............................................................26.406s -Start: Verify time -End: Verify time ...............................................................5.547ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 4031542 advice cells -Total 130 fixed cells -Total range check advice cells to lookup per phase: [439253, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................12.035s -Start: Generating pkey -End: Generating pkey ...........................................................8.203s -Start: Proving time -End: Proving time ..............................................................40.572s -Start: Verify time -End: Verify time ...............................................................34.112ms ----------------------- degree = 22 ------------------------------ -Gate Chip | Phase 0: 3997423 advice cells -Total 130 fixed cells -Total range check advice cells to lookup per phase: [427880, 0, 0] -read params from ./params/kzg_bn254_22.srs -Start: Generating vkey -End: Generating vkey ...........................................................13.073s -Start: Generating pkey -End: Generating pkey ...........................................................11.775s -Start: Proving time -End: Proving time ..............................................................66.798s -Start: Verify time -End: Verify time ...............................................................50.846ms - - -successes: - bn254::tests::bls_signature::bench_bls_signature - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 41 filtered out; finished in 426.60s diff --git a/result2.txt b/result2.txt deleted file mode 100644 index 2c5eb3f..0000000 --- a/result2.txt +++ /dev/null @@ -1,9 +0,0 @@ - Finished test [optimized + debuginfo] target(s) in 0.84s - Running unittests src/lib.rs (target/debug/deps/halo2_ecc-ff458f914a36701b) - -running 1 test -test bn254::tests::combine_bls_mt::bench_merkle_tree has been running for over 60 seconds -error: test failed, to rerun pass `-p halo2-ecc --lib` - -Caused by: - process didn't exit successfully: `/home/wuyun/zk/halo2/halo2-lib/target/debug/deps/halo2_ecc-ff458f914a36701b 'bn254::tests::combine_bls_mt::bench_merkle_tree' --exact --show-output` (signal: 9, SIGKILL: kill) diff --git a/result3.txt b/result3.txt deleted file mode 100644 index cbb25bf..0000000 --- a/result3.txt +++ /dev/null @@ -1,121 +0,0 @@ - Finished test [optimized + debuginfo] target(s) in 0.88s - Running unittests src/lib.rs (target/debug/deps/halo2_ecc-ff458f914a36701b) - -running 1 test -test bn254::tests::combine_bls_mt::bench_merkle_tree has been running for over 60 seconds -test bn254::tests::combine_bls_mt::bench_merkle_tree ... ok - -successes: - ----- bn254::tests::combine_bls_mt::bench_merkle_tree stdout ---- ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 136114133 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [2360006, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................322.201s -Start: Generating pkey -End: Generating pkey ...........................................................232.806s -Start: Proving time -End: Proving time ..............................................................410.770s -Start: Verify time -End: Verify time ...............................................................32.054ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 4604277 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [458054, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................9.944s -Start: Generating pkey -End: Generating pkey ...........................................................6.129s -Start: Proving time -End: Proving time ..............................................................20.975s -Start: Verify time -End: Verify time ...............................................................8.835ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 5275253 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [473030, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................11.460s -Start: Generating pkey -End: Generating pkey ...........................................................7.077s -Start: Proving time -End: Proving time ..............................................................23.262s -Start: Verify time -End: Verify time ...............................................................7.387ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 6761429 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [502982, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................13.739s -Start: Generating pkey -End: Generating pkey ...........................................................8.700s -Start: Proving time -End: Proving time ..............................................................26.435s -Start: Verify time -End: Verify time ...............................................................8.037ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 10022229 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [562886, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................21.479s -Start: Generating pkey -End: Generating pkey ...........................................................13.494s -Start: Proving time -End: Proving time ..............................................................39.702s -Start: Verify time -End: Verify time ...............................................................9.910ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 17120725 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [682694, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................36.299s -Start: Generating pkey -End: Generating pkey ...........................................................24.056s -Start: Proving time -End: Proving time ..............................................................58.665s -Start: Verify time -End: Verify time ...............................................................11.860ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 32471509 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [922310, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................69.717s -Start: Generating pkey -End: Generating pkey ...........................................................47.625s -Start: Proving time -End: Proving time ..............................................................100.942s -Start: Verify time -End: Verify time ...............................................................14.959ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 65480661 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [1401542, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................149.096s -Start: Generating pkey -End: Generating pkey ...........................................................105.259s -Start: Proving time -End: Proving time ..............................................................198.758s -Start: Verify time -End: Verify time ...............................................................20.028ms - - -successes: - bn254::tests::combine_bls_mt::bench_merkle_tree - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 41 filtered out; finished in 2157.14s - diff --git a/result_combine.txt b/result_combine.txt deleted file mode 100644 index 1fa6a06..0000000 --- a/result_combine.txt +++ /dev/null @@ -1,330 +0,0 @@ - Compiling halo2-ecc v0.4.1 (/home/wuyun/zk/halo2/halo2-lib/halo2-ecc) - Finished test [optimized + debuginfo] target(s) in 18.46s - Running unittests src/lib.rs (target/debug/deps/halo2_ecc-ff458f914a36701b) - -running 1 test -test bn254::tests::combine_bls_mt::bench_merkle_tree has been running for over 60 seconds -test bn254::tests::combine_bls_mt::bench_merkle_tree ... ok - -successes: - ----- bn254::tests::combine_bls_mt::bench_merkle_tree stdout ---- ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 4803521 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [535994, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................11.211s -Start: Generating pkey -End: Generating pkey ...........................................................5.846s -Start: Proving time -End: Proving time ..............................................................20.483s -Start: Verify time -End: Verify time ...............................................................13.824ms ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 5480113 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [553130, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................11.990s -Start: Generating pkey -End: Generating pkey ...........................................................6.691s -Start: Proving time -End: Proving time ..............................................................21.083s -Start: Verify time -End: Verify time ...............................................................11.989ms ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 6977521 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [587402, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................15.269s -Start: Generating pkey -End: Generating pkey ...........................................................8.472s -Start: Proving time -End: Proving time ..............................................................26.746s -Start: Verify time -End: Verify time ...............................................................16.513ms ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 10260785 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [655946, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................23.240s -Start: Generating pkey -End: Generating pkey ...........................................................13.243s -Start: Proving time -End: Proving time ..............................................................37.867s -Start: Verify time -End: Verify time ...............................................................17.600ms ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 17404209 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [793034, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................40.413s -Start: Generating pkey -End: Generating pkey ...........................................................25.066s -Start: Proving time -End: Proving time ..............................................................62.184s -Start: Verify time -End: Verify time ...............................................................19.894ms ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 32844849 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [1067210, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................77.852s -Start: Generating pkey -End: Generating pkey ...........................................................47.970s -Start: Proving time -End: Proving time ..............................................................110.380s -Start: Verify time -End: Verify time ...............................................................31.000ms ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 66033713 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [1615562, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................165.561s -Start: Generating pkey -End: Generating pkey ...........................................................104.840s -Start: Proving time -End: Proving time ..............................................................217.137s -Start: Verify time -End: Verify time ...............................................................67.162ms ----------------------- degree = 17 ------------------------------ -Gate Chip | Phase 0: 137026609 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [2712266, 0, 0] -read params from ./params/kzg_bn254_17.srs -Start: Generating vkey -End: Generating vkey ...........................................................386.300s -Start: Generating pkey -End: Generating pkey ...........................................................274.839s -Start: Proving time -End: Proving time ..............................................................454.846s -Start: Verify time -End: Verify time ...............................................................121.191ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 4604277 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [458054, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................10.024s -Start: Generating pkey -End: Generating pkey ...........................................................6.112s -Start: Proving time -End: Proving time ..............................................................21.158s -Start: Verify time -End: Verify time ...............................................................6.945ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 5275253 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [473030, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................11.490s -Start: Generating pkey -End: Generating pkey ...........................................................7.076s -Start: Proving time -End: Proving time ..............................................................23.607s -Start: Verify time -End: Verify time ...............................................................6.917ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 6761429 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [502982, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................13.853s -Start: Generating pkey -End: Generating pkey ...........................................................8.647s -Start: Proving time -End: Proving time ..............................................................26.420s -Start: Verify time -End: Verify time ...............................................................7.222ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 10022229 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [562886, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................21.315s -Start: Generating pkey -End: Generating pkey ...........................................................13.335s -Start: Proving time -End: Proving time ..............................................................39.701s -Start: Verify time -End: Verify time ...............................................................9.879ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 17120725 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [682694, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................36.828s -Start: Generating pkey -End: Generating pkey ...........................................................23.585s -Start: Proving time -End: Proving time ..............................................................59.126s -Start: Verify time -End: Verify time ...............................................................11.058ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 32471509 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [922310, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................70.138s -Start: Generating pkey -End: Generating pkey ...........................................................56.340s -Start: Proving time -End: Proving time ..............................................................101.630s -Start: Verify time -End: Verify time ...............................................................14.822ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 65480661 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [1401542, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................149.283s -Start: Generating pkey -End: Generating pkey ...........................................................102.731s -Start: Proving time -End: Proving time ..............................................................198.763s -Start: Verify time -End: Verify time ...............................................................24.836ms ----------------------- degree = 19 ------------------------------ -Gate Chip | Phase 0: 136114133 advice cells -Total 452 fixed cells -Total range check advice cells to lookup per phase: [2360006, 0, 0] -read params from ./params/kzg_bn254_19.srs -Start: Generating vkey -End: Generating vkey ...........................................................322.792s -Start: Generating pkey -End: Generating pkey ...........................................................241.096s -Start: Proving time -End: Proving time ..............................................................413.815s -Start: Verify time -End: Verify time ...............................................................33.925ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 4551476 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [451979, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................13.687s -Start: Generating pkey -End: Generating pkey ...........................................................9.337s -Start: Proving time -End: Proving time ..............................................................45.698s -Start: Verify time -End: Verify time ...............................................................7.725ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 5220292 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [466523, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................14.369s -Start: Generating pkey -End: Generating pkey ...........................................................9.779s -Start: Proving time -End: Proving time ..............................................................46.437s -Start: Verify time -End: Verify time ...............................................................34.882ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 6702148 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [495611, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................17.207s -Start: Generating pkey -End: Generating pkey ...........................................................11.761s -Start: Proving time -End: Proving time ..............................................................50.431s -Start: Verify time -End: Verify time ...............................................................5.753ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 9954308 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [553787, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................23.226s -Start: Generating pkey -End: Generating pkey ...........................................................16.101s -Start: Proving time -End: Proving time ..............................................................57.714s -Start: Verify time -End: Verify time ...............................................................35.875ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 17035524 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [670139, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................38.034s -Start: Generating pkey -End: Generating pkey ...........................................................26.171s -Start: Proving time -End: Proving time ..............................................................79.465s -Start: Verify time -End: Verify time ...............................................................41.274ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 32351748 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [902843, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................69.177s -Start: Generating pkey -End: Generating pkey ...........................................................48.330s -Start: Proving time -End: Proving time ..............................................................117.655s -Start: Verify time -End: Verify time ...............................................................9.992ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 65291780 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [1368251, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................141.103s -Start: Generating pkey -End: Generating pkey ...........................................................106.131s -Start: Proving time -End: Proving time ..............................................................207.408s -Start: Verify time -End: Verify time ...............................................................12.353ms ----------------------- degree = 21 ------------------------------ -Gate Chip | Phase 0: 135787012 advice cells -Total 454 fixed cells -Total range check advice cells to lookup per phase: [2299067, 0, 0] -read params from ./params/kzg_bn254_21.srs -Start: Generating vkey -End: Generating vkey ...........................................................305.706s -Start: Generating pkey -End: Generating pkey ...........................................................229.797s -Start: Proving time -End: Proving time ..............................................................414.703s -Start: Verify time -End: Verify time ...............................................................13.508ms - - -successes: - bn254::tests::combine_bls_mt::bench_merkle_tree - -test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 41 filtered out; finished in 6855.39s - diff --git a/result_mt.txt b/result_mt.txt deleted file mode 100644 index 5af07d3..0000000 --- a/result_mt.txt +++ /dev/null @@ -1,9 +0,0 @@ - Finished test [optimized + debuginfo] target(s) in 0.16s - Running unittests src/lib.rs (target/debug/deps/halo2_ecc-ff458f914a36701b) - -running 1 test -test bn254::tests::merkle_tree::bench_merkle_tree has been running for over 60 seconds -error: test failed, to rerun pass `-p halo2-ecc --lib` - -Caused by: - process didn't exit successfully: `/home/wuyun/zk/halo2/halo2-lib/target/debug/deps/halo2_ecc-ff458f914a36701b 'bn254::tests::merkle_tree::bench_merkle_tree' --exact --show-output` (signal: 9, SIGKILL: kill)