add gate count metrics (#238)
* add gate count metrics * tweak params * move metrics to its own file
This commit is contained in:
parent
de9b206852
commit
c3c9e7f99c
8 changed files with 222 additions and 18 deletions
|
|
@ -30,6 +30,7 @@ use crate::{
|
|||
PublicKey, SecretKey, Signature, DUMMY_PUBLIC_INPUTS, DUMMY_SIGNATURE, VP,
|
||||
},
|
||||
},
|
||||
measure_gates_begin, measure_gates_end,
|
||||
middleware::{Hash, RawValue, EMPTY_HASH, EMPTY_VALUE, F, VALUE_SIZE},
|
||||
};
|
||||
|
||||
|
|
@ -65,6 +66,7 @@ impl SignatureVerifyGadget {
|
|||
impl SignatureVerifyGadget {
|
||||
/// creates the targets and defines the logic of the circuit
|
||||
pub fn eval(&self, builder: &mut CircuitBuilder<F, D>) -> Result<SignatureVerifyTarget> {
|
||||
let measure = measure_gates_begin!(builder, "SignatureVerify");
|
||||
let enabled = builder.add_virtual_bool_target_safe();
|
||||
|
||||
let common_data = VP.0.common.clone();
|
||||
|
|
@ -115,6 +117,7 @@ impl SignatureVerifyGadget {
|
|||
|
||||
builder.verify_proof::<C>(&proof_targ, &verifier_data_targ, &common_data);
|
||||
|
||||
measure_gates_end!(builder, measure);
|
||||
Ok(SignatureVerifyTarget {
|
||||
verifier_data_targ,
|
||||
enabled,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue