From d920bcb2f4e4772ae6fa07f69550ebb6b08531e1 Mon Sep 17 00:00:00 2001 From: aniampio Date: Wed, 31 Aug 2022 11:55:15 +0300 Subject: [PATCH] Update compact benchmarks --- common/nym_offline_compact_ecash/benches/benchmarks.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/nym_offline_compact_ecash/benches/benchmarks.rs b/common/nym_offline_compact_ecash/benches/benchmarks.rs index df2c3545b1..05d36bb1b6 100644 --- a/common/nym_offline_compact_ecash/benches/benchmarks.rs +++ b/common/nym_offline_compact_ecash/benches/benchmarks.rs @@ -159,21 +159,23 @@ fn bench_compact_ecash(c: &mut Criterion) { num_authorities: 100, threshold_p: 0.7, L: 100, - spend_vv: 10, + spend_vv: 1, case_nr_pub_keys: 50, }; let params = setup(case.L); let grp = params.grp(); let user_keypair = generate_keypair_user(&grp); - let authorities_keypairs = ttp_keygen(&grp, 2, 3).unwrap(); + let threshold = (case.threshold_p * case.num_authorities as f32).round() as u64; + let authorities_keypairs = ttp_keygen(&grp, threshold, case.num_authorities).unwrap(); let verification_keys_auth: Vec = authorities_keypairs .iter() .map(|keypair| keypair.verification_key()) .collect(); + let indices: Vec = (0..case.num_authorities).collect(); let verification_key = - aggregate_verification_keys(&verification_keys_auth, Some(&[1, 2, 3])).unwrap(); + aggregate_verification_keys(&verification_keys_auth, Some(&indices)).unwrap(); // ISSUANCE PHASE let (req, req_info) = withdrawal_request(grp, &user_keypair.secret_key()).unwrap();