Skip to content

Commit

Permalink
rename, remove elf
Browse files Browse the repository at this point in the history
  • Loading branch information
mcalancea committed Jan 7, 2025
1 parent e590a2b commit 08f34e7
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 51 deletions.
62 changes: 31 additions & 31 deletions is_prime/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion is_prime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ inside Solidity.
To retrieve your `programVKey` for your on-chain contract, run the following command:

```sh
cargo prove vkey --program fibonacci-program
cargo prove vkey --program is_prime-program
```

## Using the Prover Network
Expand Down
Binary file removed is_prime/elf/riscv32im-succinct-zkvm-elf
Binary file not shown.
2 changes: 1 addition & 1 deletion is_prime/lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "fibonacci-lib"
name = "is_prime-lib"
version = "0.1.0"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion is_prime/program/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions is_prime/program/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
version = "0.1.0"
name = "fibonacci-program"
name = "is_prime-program"
edition = "2021"

[dependencies]
alloy-sol-types = { workspace = true }
sp1-zkvm = "3.0.0-rc4"
fibonacci-lib = { path = "../lib" }
is_prime-lib = { path = "../lib" }
2 changes: 1 addition & 1 deletion is_prime/program/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
sp1_zkvm::entrypoint!(main);

use alloy_sol_types::SolType;
use fibonacci_lib::{is_prime, PublicValuesStruct};
use is_prime_lib::{is_prime, PublicValuesStruct};

pub fn main() {
// Read an input to the program.
Expand Down
2 changes: 1 addition & 1 deletion is_prime/script/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions is_prime/script/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
version = "0.1.0"
name = "fibonacci-script"
name = "is_prime-script"
edition = "2021"
default-run = "fibonacci"
default-run = "is_prime"

[[bin]]
name = "fibonacci"
name = "is_prime"
path = "src/bin/main.rs"

[[bin]]
Expand All @@ -20,7 +20,7 @@ clap = { version = "4.0", features = ["derive", "env"] }
tracing = "0.1.40"
hex = "0.4.3"
alloy-sol-types = { workspace = true }
fibonacci-lib = { path = "../lib" }
is_prime-lib = { path = "../lib" }

[build-dependencies]
sp1-helper = "3.0.0"
10 changes: 5 additions & 5 deletions is_prime/script/src/bin/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
use alloy_sol_types::SolType;
use clap::{Parser, ValueEnum};
use fibonacci_lib::PublicValuesStruct;
use is_prime_lib::PublicValuesStruct;
use serde::{Deserialize, Serialize};
use sp1_sdk::{
include_elf, HashableKey, ProverClient, SP1ProofWithPublicValues, SP1Stdin, SP1VerifyingKey,
};
use std::path::PathBuf;

/// The ELF (executable and linkable format) file for the Succinct RISC-V zkVM.
pub const FIBONACCI_ELF: &[u8] = include_elf!("fibonacci-program");
pub const is_prime_ELF: &[u8] = include_elf!("is_prime-program");

/// The arguments for the EVM command.
#[derive(Parser, Debug)]
Expand All @@ -42,7 +42,7 @@ enum ProofSystem {
/// A fixture that can be used to test the verification of SP1 zkVM proofs inside Solidity.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
struct SP1FibonacciProofFixture {
struct SP1is_primeProofFixture {
cnt_primes: u32,
n: u32,
vkey: String,
Expand All @@ -61,7 +61,7 @@ fn main() {
let client = ProverClient::new();

// Setup the program.
let (pk, vk) = client.setup(FIBONACCI_ELF);
let (pk, vk) = client.setup(is_prime_ELF);

// Setup the inputs.
let mut stdin = SP1Stdin::new();
Expand Down Expand Up @@ -92,7 +92,7 @@ fn create_proof_fixture(
PublicValuesStruct::abi_decode(bytes, false).unwrap();

// Create the testing fixture so we can test things end-to-end.
let fixture = SP1FibonacciProofFixture {
let fixture = SP1is_primeProofFixture {
cnt_primes,
n,
vkey: vk.bytes32().to_string(),
Expand Down
8 changes: 4 additions & 4 deletions is_prime/script/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
use alloy_sol_types::SolType;
use clap::Parser;
use fibonacci_lib::PublicValuesStruct;
use is_prime_lib::PublicValuesStruct;
use sp1_sdk::{include_elf, ProverClient, SP1Stdin};

/// The ELF (executable and linkable format) file for the Succinct RISC-V zkVM.
pub const FIBONACCI_ELF: &[u8] = include_elf!("fibonacci-program");
pub const is_prime_ELF: &[u8] = include_elf!("is_prime-program");

/// The arguments for the command.
#[derive(Parser, Debug)]
Expand Down Expand Up @@ -55,7 +55,7 @@ fn main() {

if args.execute {
// Execute the program
let (output, report) = client.execute(FIBONACCI_ELF, stdin).run().unwrap();
let (output, report) = client.execute(is_prime_ELF, stdin).run().unwrap();
println!("Program executed successfully.");

// Read the output.
Expand All @@ -72,7 +72,7 @@ fn main() {
println!("Number of cycles: {}", report.total_instruction_count());
} else {
// Setup the program for proving.
let (pk, vk) = client.setup(FIBONACCI_ELF);
let (pk, vk) = client.setup(is_prime_ELF);

// Generate the proof
let proof = client
Expand Down

0 comments on commit 08f34e7

Please sign in to comment.