Skip to content

Commit

Permalink
Remove extra range proof verifications
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFeickert committed Mar 6, 2024
1 parent 820e936 commit 1def6c9
Showing 1 changed file with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -547,27 +547,9 @@ pub fn batch_verify_range_proofs(
});
proofs.push(output.proof_result()?.as_vec());
}
if let Err(err_1) = prover.verify_batch(proofs, statements.iter().collect()) {
for output in &bulletproof_plus_proofs {
if let Err(err_2) = output.verify_range_proof(prover) {
return Err(RangeProofError::InvalidRangeProof {
reason: format!(
"commitment {}, minimum_value_promise {}, proof {} ({:?})",
output.commitment.to_hex(),
output.minimum_value_promise,
output.proof_hex_display(false),
err_2,
),
});
}
}
Err(RangeProofError::InvalidRangeProof {
reason: format!(
"Batch verification failed, but individual verification passed - {:?}",
err_1
),
})?
}

// Attempt to verify the range proofs in a batch
prover.verify_batch(proofs, statements.iter().collect())?;
}

let revealed_value_proofs = outputs
Expand Down

0 comments on commit 1def6c9

Please sign in to comment.