Remove spend verification from the identify function
This commit is contained in:
@@ -152,7 +152,8 @@ struct BenchCase {
|
||||
|
||||
fn bench_compact_ecash(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("benchmark-compact-ecash");
|
||||
group.measurement_time(Duration::from_secs(200));
|
||||
group.sample_size(300);
|
||||
group.measurement_time(Duration::from_secs(1500));
|
||||
|
||||
let case = BenchCase {
|
||||
num_authorities: 100,
|
||||
@@ -353,5 +354,5 @@ fn bench_compact_ecash(c: &mut Criterion) {
|
||||
assert_eq!(identify_result, IdentifyResult::DoubleSpendingPublicKeys(user_keypair.public_key()));
|
||||
}
|
||||
|
||||
criterion_group!(benches, bench_pairings, bench_compact_ecash);
|
||||
criterion_group!(benches, bench_compact_ecash);
|
||||
criterion_main!(benches);
|
||||
|
||||
@@ -13,10 +13,6 @@ pub enum IdentifyResult {
|
||||
|
||||
|
||||
pub fn identify(params: &Parameters, public_keys_u: &[PublicKeyUser], verification_key: &VerificationKeyAuth, payment1: Payment, payment2: Payment, pay_info1: PayInfo, pay_info2: PayInfo) -> Result<IdentifyResult> {
|
||||
// verify first the validity of both payments
|
||||
assert!(payment1.spend_verify(¶ms, &verification_key, &pay_info1).unwrap());
|
||||
assert!(payment2.spend_verify(¶ms, &verification_key, &pay_info2).unwrap());
|
||||
|
||||
let mut k = 0;
|
||||
let mut j = 0;
|
||||
'outer: for (id1, pay1_ss) in payment1.ss.iter().enumerate() {
|
||||
|
||||
@@ -149,7 +149,8 @@ struct BenchCase {
|
||||
|
||||
fn bench_divisible_ecash(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("benchmark-divisible-ecash");
|
||||
group.measurement_time(Duration::from_secs(200));
|
||||
group.sample_size(300);
|
||||
group.measurement_time(Duration::from_secs(1500));
|
||||
|
||||
let case = BenchCase {
|
||||
num_authorities: 100,
|
||||
@@ -322,5 +323,5 @@ fn bench_divisible_ecash(c: &mut Criterion) {
|
||||
assert_eq!(identify_result, IdentifyResult::DoubleSpendingPublicKeys(pk_user));
|
||||
}
|
||||
|
||||
criterion_group!(benches, bench_pairings, bench_divisible_ecash);
|
||||
criterion_group!(benches, bench_divisible_ecash);
|
||||
criterion_main!(benches);
|
||||
@@ -27,10 +27,6 @@ pub fn identify(
|
||||
payment2: Payment,
|
||||
pay_info1: PayInfo,
|
||||
pay_info2: PayInfo) -> Result<IdentifyResult> {
|
||||
// verify first the validity of both payments
|
||||
assert!(payment1.spend_verify(¶ms, &verification_key, &pay_info1).unwrap());
|
||||
assert!(payment2.spend_verify(¶ms, &verification_key, &pay_info2).unwrap());
|
||||
|
||||
let params_a = params.get_params_a();
|
||||
|
||||
// compute the serial numbers for k1 in [0, V1-1]
|
||||
|
||||
Reference in New Issue
Block a user