Skip to content

Commit dc7c05e

Browse files
committed
feat: include schnorr sig verify in report
1 parent b01fa72 commit dc7c05e

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

perf/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use serde::Serialize;
66
use serde_json::json;
77
use strata_zkvm::ProofReport;
88
pub use zkvm_runner::{risc0_fib_report, risc0_sha_report, sp1_fib_report, sp1_sha_report};
9+
use zkvm_runner::{risc0_schnorr_sig_verify_report, sp1_schnorr_sig_verify_report};
910

1011
#[tokio::main]
1112
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -87,6 +88,7 @@ fn run_sp1_programs() -> Vec<PerformanceReport> {
8788

8889
reports.push(sp1_fib_report().into());
8990
reports.push(sp1_sha_report().into());
91+
reports.push(sp1_schnorr_sig_verify_report().into());
9092

9193
reports
9294
}
@@ -99,6 +101,7 @@ fn run_risc0_programs() -> Vec<PerformanceReport> {
99101

100102
reports.push(risc0_fib_report().into());
101103
reports.push(risc0_sha_report().into());
104+
reports.push(risc0_schnorr_sig_verify_report().into());
102105

103106
reports
104107
}

runner/src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
mod programs;
22

33
#[cfg(feature = "risc0")]
4-
pub use programs::{fibonacci::risc0_fib_report, sha2::risc0_sha_report};
4+
pub use programs::{
5+
fibonacci::risc0_fib_report, schnorr::risc0_schnorr_sig_verify_report, sha2::risc0_sha_report,
6+
};
57
#[cfg(feature = "sp1")]
6-
pub use programs::{fibonacci::sp1_fib_report, sha2::sp1_sha_report};
8+
pub use programs::{
9+
fibonacci::sp1_fib_report, schnorr::sp1_schnorr_sig_verify_report, sha2::sp1_sha_report,
10+
};

runner/src/programs/schnorr.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,27 @@ fn perf_report(host: &impl ZkVmHostPerf) -> ProofReport {
88
}
99

1010
#[cfg(feature = "sp1")]
11-
fn sp1_proof_report() -> ProofReport {
11+
pub fn sp1_schnorr_sig_verify_report() -> ProofReport {
1212
use strata_sp1_adapter::SP1Host;
1313
use strata_sp1_artifacts::SCHNORR_SIG_VERIFY_ELF;
1414
let host = SP1Host::init(&SCHNORR_SIG_VERIFY_ELF);
1515
perf_report(&host)
1616
}
1717

18+
#[cfg(feature = "risc0")]
19+
pub fn risc0_schnorr_sig_verify_report() -> ProofReport {
20+
use strata_risc0_adapter::Risc0Host;
21+
use strata_risc0_artifacts::GUEST_RISC0_SCHNORR_SIG_VERIFY_ELF;
22+
let host = Risc0Host::init(&GUEST_RISC0_SCHNORR_SIG_VERIFY_ELF);
23+
perf_report(&host)
24+
}
25+
1826
pub fn make_proofs() {
1927
#[cfg(feature = "sp1")]
2028
let report = sp1_proof_report();
2129
println!("{}", report.cycles);
30+
31+
#[cfg(feature = "risc0")]
32+
let report = risc0_proof_report();
33+
println!("{}", report.cycles);
2234
}

0 commit comments

Comments
 (0)