Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
CeciliaZ030 committed May 10, 2024
1 parent 3c8fb6b commit 6f86e28
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pipeline/harness/macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use syn::{parse_macro_input, punctuated::Punctuated, Ident, Item, ItemFn, ItemMo
#[proc_macro]
pub fn entrypoint(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as EntryArgs);
let _main_entry = input.main_entry;
let main_entry = input.main_entry;
let mut tests_entry = quote! {
fn run_tests() {}
};
Expand Down
14 changes: 7 additions & 7 deletions provers/sp1/driver/src/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use test::Bencher;

use sp1_sdk::{ProverClient, SP1Stdin};

const BN256_ADD_ELF: &[u8] = include_bytes!("../../guest/elf/bn254-add");
const BN256_MUL_ELF: &[u8] = include_bytes!("../../guest/elf/bn254-mul");
const BN254_ADD_ELF: &[u8] = include_bytes!("../../guest/elf/bn254-add");
const BN254_MUL_ELF: &[u8] = include_bytes!("../../guest/elf/bn254-mul");
const ECDSA_ELF: &[u8] = include_bytes!("../../guest/elf/ecdsa");
const SHA256_ELF: &[u8] = include_bytes!("../../guest/elf/sha256");

Expand All @@ -30,25 +30,25 @@ fn bench_sha256(b: &mut Bencher) {
}

#[bench]
fn bench_some_computatio(b: &mut Bencher) {
fn bench_ecdsa(b: &mut Bencher) {
run_once(|b| {
prove(ECDSA_ELF);
Ok(())
});
}

#[bench]
fn bench_sha256(b: &mut Bencher) {
fn bench_bn254_add(b: &mut Bencher) {
run_once(|b| {
prove(BN256_ADD_ELF);
prove(BN254_ADD_ELF);
Ok(())
});
}

#[bench]
fn bench_some_computatio(b: &mut Bencher) {
fn bench_bn254_mul(b: &mut Bencher) {
run_once(|b| {
prove(BN256_MUL_ELF);
prove(BN254_MUL_ELF);
Ok(())
});
}
6 changes: 3 additions & 3 deletions provers/sp1/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ impl Prover for Sp1Prover {
#[test]
fn test_guest() {
// TODO(Cecilia): imple GuestInput::mock() for unit test
let mut client = ProverClient::new();
let mut stdin = SP1Stdin::new();
let client = ProverClient::new();
let stdin = SP1Stdin::new();
let (pk, vk) = client.setup(TEST_ELF);
let mut proof = client.prove(&pk, stdin).expect("Sp1: proving failed");
let proof = client.prove(&pk, stdin).expect("Sp1: proving failed");
client
.verify(&proof, &vk)
.expect("Sp1: verification failed");
Expand Down
Binary file modified provers/sp1/guest/elf/sp1-guest
Binary file not shown.

0 comments on commit 6f86e28

Please sign in to comment.