Skip to content

Commit 6216545

Browse files
committed
fixes and litns
1 parent dc7c05e commit 6216545

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

.vscode/settings.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"editor.formatOnSave": true,
33
"rust-analyzer.checkOnSave": true,
4-
"rust-analyzer.check.overrideCommand": [
5-
"cargo",
6-
"clippy",
7-
"--workspace",
4+
"rust-analyzer.check.command": "clippy",
5+
"rust-analyzer.check.extraArgs": [
86
"--all-features",
9-
"--benches",
107
"--tests",
8+
"--benches",
119
"--examples",
12-
"--message-format=json"
10+
"--no-deps"
1311
],
12+
"rust-analyzer.server.extraEnv": {
13+
"RISC0_SKIP_BUILD": "1",
14+
"RISC0_SKIP_BUILD_KERNELS": "1",
15+
"CARGO_TARGET_DIR": "target/analyzer"
16+
},
1417
"rust-analyzer.linkedProjects": [
1518
"Cargo.toml",
1619
"artifacts/sp1/Cargo.toml",

artifacts/sp1/schnorr-sig-verify/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ mock = ["strata-sp1-adapter/mock"]
1515

1616
[patch.crates-io]
1717
sha2-v0-10-8 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", branch = "patch-sha2-v0.10.8" }
18-
# k256 = { path = "../../../../../../playground/elliptic-curves/k256" }
1918
secp256k1 = { git = "https://github.com/sp1-patches/rust-secp256k1", branch = "patch-secp256k1-v0.29.1" }

perf/src/main.rs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,26 +84,22 @@ impl From<ProofReport> for PerformanceReport {
8484
///
8585
/// Generates [`PerformanceReport`] for each invocation.
8686
fn run_sp1_programs() -> Vec<PerformanceReport> {
87-
let mut reports = vec![];
88-
89-
reports.push(sp1_fib_report().into());
90-
reports.push(sp1_sha_report().into());
91-
reports.push(sp1_schnorr_sig_verify_report().into());
92-
93-
reports
87+
vec![
88+
sp1_fib_report().into(),
89+
sp1_sha_report().into(),
90+
sp1_schnorr_sig_verify_report().into(),
91+
]
9492
}
9593

96-
/// Runs SP1 programs to generate reports.
94+
/// Runs Risc0 programs to generate reports.
9795
///
9896
/// Generates [`PerformanceReport`] for each invocation.
9997
fn run_risc0_programs() -> Vec<PerformanceReport> {
100-
let mut reports = vec![];
101-
102-
reports.push(risc0_fib_report().into());
103-
reports.push(risc0_sha_report().into());
104-
reports.push(risc0_schnorr_sig_verify_report().into());
105-
106-
reports
98+
vec![
99+
risc0_fib_report().into(),
100+
risc0_sha_report().into(),
101+
risc0_schnorr_sig_verify_report().into(),
102+
]
107103
}
108104

109105
/// Returns a formatted header for the performance report with basic PR data.

runner/src/programs/fibonacci.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ fn fib_prover_perf_report(host: &impl ZkVmHostPerf) -> ProofReport {
1111
pub fn sp1_fib_report() -> ProofReport {
1212
use strata_sp1_adapter::SP1Host;
1313
use strata_sp1_artifacts::FIBONACCI_ELF;
14-
let host = SP1Host::init(&FIBONACCI_ELF);
14+
let host = SP1Host::init(FIBONACCI_ELF);
1515
fib_prover_perf_report(&host)
1616
}
1717

1818
#[cfg(feature = "risc0")]
1919
pub fn risc0_fib_report() -> ProofReport {
2020
use strata_risc0_adapter::Risc0Host;
2121
use strata_risc0_artifacts::GUEST_RISC0_FIBONACCI_ELF;
22-
let host = Risc0Host::init(&GUEST_RISC0_FIBONACCI_ELF);
22+
let host = Risc0Host::init(GUEST_RISC0_FIBONACCI_ELF);
2323
fib_prover_perf_report(&host)
2424
}
2525

runner/src/programs/schnorr.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use schnorr_sig_verify::{SchnorrSigInput, SchnorrSigProver};
2-
use strata_zkvm::{ProofReceipt, ProofReport, ZkVmHost, ZkVmHostPerf, ZkVmProver, ZkVmProverPerf};
2+
use strata_zkvm::{ProofReport, ZkVmHostPerf, ZkVmProverPerf};
33

44
fn perf_report(host: &impl ZkVmHostPerf) -> ProofReport {
55
let input = SchnorrSigInput::new_random();
@@ -11,24 +11,25 @@ fn perf_report(host: &impl ZkVmHostPerf) -> ProofReport {
1111
pub fn sp1_schnorr_sig_verify_report() -> ProofReport {
1212
use strata_sp1_adapter::SP1Host;
1313
use strata_sp1_artifacts::SCHNORR_SIG_VERIFY_ELF;
14-
let host = SP1Host::init(&SCHNORR_SIG_VERIFY_ELF);
14+
let host = SP1Host::init(SCHNORR_SIG_VERIFY_ELF);
1515
perf_report(&host)
1616
}
1717

1818
#[cfg(feature = "risc0")]
1919
pub fn risc0_schnorr_sig_verify_report() -> ProofReport {
2020
use strata_risc0_adapter::Risc0Host;
2121
use strata_risc0_artifacts::GUEST_RISC0_SCHNORR_SIG_VERIFY_ELF;
22-
let host = Risc0Host::init(&GUEST_RISC0_SCHNORR_SIG_VERIFY_ELF);
22+
let host = Risc0Host::init(GUEST_RISC0_SCHNORR_SIG_VERIFY_ELF);
2323
perf_report(&host)
2424
}
2525

26+
#[allow(dead_code)]
2627
pub fn make_proofs() {
2728
#[cfg(feature = "sp1")]
28-
let report = sp1_proof_report();
29+
let report = sp1_schnorr_sig_verify_report();
2930
println!("{}", report.cycles);
3031

3132
#[cfg(feature = "risc0")]
32-
let report = risc0_proof_report();
33+
let report = risc0_schnorr_sig_verify_report();
3334
println!("{}", report.cycles);
3435
}

runner/src/programs/sha2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ fn sha2_prover_perf_report(host: &impl ZkVmHostPerf) -> ProofReport {
1111
pub fn sp1_sha_report() -> ProofReport {
1212
use strata_sp1_adapter::SP1Host;
1313
use strata_sp1_artifacts::SHA2_CHAIN_ELF;
14-
let host = SP1Host::init(&SHA2_CHAIN_ELF);
14+
let host = SP1Host::init(SHA2_CHAIN_ELF);
1515
sha2_prover_perf_report(&host)
1616
}
1717

1818
#[cfg(feature = "risc0")]
1919
pub fn risc0_sha_report() -> ProofReport {
2020
use strata_risc0_adapter::Risc0Host;
2121
use strata_risc0_artifacts::GUEST_RISC0_SHA2_CHAIN_ELF;
22-
let host = Risc0Host::init(&GUEST_RISC0_SHA2_CHAIN_ELF);
22+
let host = Risc0Host::init(GUEST_RISC0_SHA2_CHAIN_ELF);
2323
sha2_prover_perf_report(&host)
2424
}
2525

0 commit comments

Comments
 (0)