From 55d0eddecb261207ccdc3f22f5e687a7bf5a2785 Mon Sep 17 00:00:00 2001 From: Daniel Lubarov Date: Thu, 28 Jul 2022 14:11:06 -0700 Subject: [PATCH] profiling --- evm/src/recursive_verifier.rs | 80 ++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/evm/src/recursive_verifier.rs b/evm/src/recursive_verifier.rs index 17db048b..b69a5519 100644 --- a/evm/src/recursive_verifier.rs +++ b/evm/src/recursive_verifier.rs @@ -71,46 +71,66 @@ pub fn verify_proof_circuit< &nums_permutation_zs, ); - verify_stark_proof_with_challenges_circuit::( + with_context!( builder, - cpu_stark, - &all_proof.stark_proofs[Table::Cpu as usize], - &stark_challenges[Table::Cpu as usize], - &ctl_vars_per_table[Table::Cpu as usize], - inner_config, + "verify CPU proof", + verify_stark_proof_with_challenges_circuit::( + builder, + cpu_stark, + &all_proof.stark_proofs[Table::Cpu as usize], + &stark_challenges[Table::Cpu as usize], + &ctl_vars_per_table[Table::Cpu as usize], + inner_config, + ) ); - verify_stark_proof_with_challenges_circuit::( + with_context!( builder, - keccak_stark, - &all_proof.stark_proofs[Table::Keccak as usize], - &stark_challenges[Table::Keccak as usize], - &ctl_vars_per_table[Table::Keccak as usize], - inner_config, + "verify Keccak proof", + verify_stark_proof_with_challenges_circuit::( + builder, + keccak_stark, + &all_proof.stark_proofs[Table::Keccak as usize], + &stark_challenges[Table::Keccak as usize], + &ctl_vars_per_table[Table::Keccak as usize], + inner_config, + ) ); - verify_stark_proof_with_challenges_circuit::( + with_context!( builder, - logic_stark, - &all_proof.stark_proofs[Table::Logic as usize], - &stark_challenges[Table::Logic as usize], - &ctl_vars_per_table[Table::Logic as usize], - inner_config, + "verify logic proof", + verify_stark_proof_with_challenges_circuit::( + builder, + logic_stark, + &all_proof.stark_proofs[Table::Logic as usize], + &stark_challenges[Table::Logic as usize], + &ctl_vars_per_table[Table::Logic as usize], + inner_config, + ) ); - verify_stark_proof_with_challenges_circuit::( + with_context!( builder, - memory_stark, - &all_proof.stark_proofs[Table::Memory as usize], - &stark_challenges[Table::Memory as usize], - &ctl_vars_per_table[Table::Memory as usize], - inner_config, + "verify memory proof", + verify_stark_proof_with_challenges_circuit::( + builder, + memory_stark, + &all_proof.stark_proofs[Table::Memory as usize], + &stark_challenges[Table::Memory as usize], + &ctl_vars_per_table[Table::Memory as usize], + inner_config, + ) ); - verify_cross_table_lookups_circuit::( + with_context!( builder, - cross_table_lookups, - &all_proof.stark_proofs, - ctl_challenges, - inner_config, - ) + "verify cross-table lookups", + verify_cross_table_lookups_circuit::( + builder, + cross_table_lookups, + &all_proof.stark_proofs, + ctl_challenges, + inner_config, + ) + ); } /// Recursively verifies an inner proof.