remove unused deps

This commit is contained in:
Kevaundray Wedderburn
2025-05-12 11:00:15 +01:00
parent b00d7913a6
commit e2b342cda1
4 changed files with 13 additions and 24 deletions

10
Cargo.lock generated
View File

@@ -1537,12 +1537,6 @@ dependencies = [
"syn 2.0.101",
]
[[package]]
name = "dotenv"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
[[package]]
name = "downcast-rs"
version = "1.2.1"
@@ -1658,10 +1652,6 @@ name = "ere-sp1"
version = "0.1.0"
dependencies = [
"bincode",
"clap",
"dotenv",
"serde",
"serde_json",
"sp1-sdk",
"tempfile",
"thiserror 2.0.12",

View File

@@ -7,13 +7,9 @@ license.workspace = true
[dependencies]
sp1-sdk = "4.2.0"
dotenv = "0.15.0"
zkvm-interface = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
tempfile = "3.3"
clap = { version = "4.4", features = ["derive"] }
bincode = "1.3"
thiserror = "2"
tracing = "0.1"

View File

@@ -146,7 +146,8 @@ pub fn compile_sp1_program(program_crate_path: &Path) -> Result<Vec<u8>, Compile
mod tests {
use zkvm_interface::Compiler;
use crate::EreSP1;
use crate::RV32_IM_SUCCINCT_ZKVM_ELF;
use super::*;
use std::path::PathBuf;
@@ -181,7 +182,7 @@ mod tests {
#[test]
fn test_compile_trait() {
let test_guest_path = get_compile_test_guest_program_path();
match EreSP1::compile(&test_guest_path) {
match RV32_IM_SUCCINCT_ZKVM_ELF::compile(&test_guest_path) {
Ok(elf_bytes) => {
assert!(!elf_bytes.is_empty(), "ELF bytes should not be empty.");
}

View File

@@ -8,7 +8,9 @@ use zkvm_interface::{Compiler, ProgramExecutionReport, ProgramProvingReport, zkV
mod compile;
// Represents Ere compliant API for SP1
#[allow(non_camel_case_types)]
pub struct RV32_IM_SUCCINCT_ZKVM_ELF;
pub struct EreSP1;
#[derive(Debug, thiserror::Error)]
@@ -50,7 +52,7 @@ pub enum VerifyError {
Client(#[source] Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl Compiler for EreSP1 {
impl Compiler for RV32_IM_SUCCINCT_ZKVM_ELF {
type Error = SP1Error;
type Program = Vec<u8>;
@@ -60,11 +62,11 @@ impl Compiler for EreSP1 {
}
}
impl zkVM<EreSP1> for EreSP1 {
impl zkVM<RV32_IM_SUCCINCT_ZKVM_ELF> for EreSP1 {
type Error = SP1Error;
fn execute(
program_bytes: &<Self as Compiler>::Program,
program_bytes: &<RV32_IM_SUCCINCT_ZKVM_ELF as Compiler>::Program,
inputs: &zkvm_interface::Input,
) -> Result<zkvm_interface::ProgramExecutionReport, Self::Error> {
// TODO: This is expensive, should move it out and make the struct stateful
@@ -86,7 +88,7 @@ impl zkVM<EreSP1> for EreSP1 {
}
fn prove(
program_bytes: &<Self as Compiler>::Program,
program_bytes: &<RV32_IM_SUCCINCT_ZKVM_ELF as Compiler>::Program,
inputs: &zkvm_interface::Input,
) -> Result<(Vec<u8>, zkvm_interface::ProgramProvingReport), Self::Error> {
info!("Generating proof…");
@@ -116,7 +118,7 @@ impl zkVM<EreSP1> for EreSP1 {
}
fn verify(
program_bytes: &<Self as Compiler>::Program,
program_bytes: &<RV32_IM_SUCCINCT_ZKVM_ELF as Compiler>::Program,
proof: &[u8],
) -> Result<(), Self::Error> {
info!("Verifying proof…");
@@ -142,7 +144,7 @@ mod execute_tests {
fn get_compiled_test_sp1_elf() -> Result<Vec<u8>, SP1Error> {
let test_guest_path = get_execute_test_guest_program_path();
EreSP1::compile(&test_guest_path)
RV32_IM_SUCCINCT_ZKVM_ELF::compile(&test_guest_path)
}
fn get_execute_test_guest_program_path() -> PathBuf {
@@ -210,7 +212,7 @@ mod prove_tests {
fn get_compiled_test_sp1_elf_for_prove() -> Result<Vec<u8>, SP1Error> {
let test_guest_path = get_prove_test_guest_program_path();
EreSP1::compile(&test_guest_path)
RV32_IM_SUCCINCT_ZKVM_ELF::compile(&test_guest_path)
}
#[test]