taikoxyz / raiko

Multi-proofs for Taiko. SNARKS, STARKS and Trusted Execution Enclave. Our previous ZK-EVM circuits are deprecated.
Apache License 2.0
96 stars 75 forks source link

feat(prover): track cycles of sp1 guest & patch Secp256k1 #288

Closed CeciliaZ030 closed 1 week ago

CeciliaZ030 commented 2 weeks ago

Print cycles with

$ SP1_PROVER=mock RUST_LOG=debug cargo run --features sp1

Results in nice println like this:

2024-06-11T17:27:46.899215Z DEBUG execute: ┌╴sign_recover    
2024-06-11T17:27:46.926345Z DEBUG execute: │ ┌╴sign    
2024-06-11T17:27:47.066870Z  INFO execute: │ └╴1,101,016 cycles    
2024-06-11T17:27:47.066959Z DEBUG execute: │ ┌╴recover    
2024-06-11T17:27:47.372553Z  INFO execute: │ └╴379,598 cycles    
2024-06-11T17:27:47.372628Z  INFO execute: └╴1,691,304 cycles

Included the latest optimization of cycles in https://github.com/CeciliaZ030/rust-secp256k1 Diff: https://github.com/rust-bitcoin/rust-secp256k1/compare/master...CeciliaZ030:rust-secp256k1:sp1-patch?expand=1