Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed Dec 12, 2024
1 parent 13dc1d5 commit 8e3c1f1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
6 changes: 0 additions & 6 deletions crates/core/executor/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@ impl<'a> SP1ContextBuilder<'a> {
self.skip_deferred_proof_verification = skip;
self
}

/// Get the maximum number of cpu cycles to use for execution.
#[allow(clippy::must_use_candidate)]
pub fn get_max_cycles(&self) -> Option<u64> {
self.max_cycles
}
}

#[cfg(test)]
Expand Down
4 changes: 2 additions & 2 deletions crates/sdk/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ impl ProverClient {

#[deprecated(note = "Use ProverClient::builder() instead")]
pub fn new() -> Self {
Self::create_from_env()
Self::from_env()
}

fn create_from_env() -> Self {
fn from_env() -> Self {
#[cfg(feature = "network-v2")]
match std::env::var("SP1_PROVER").unwrap_or("local".to_string()).as_str() {
"network" => {
Expand Down
2 changes: 1 addition & 1 deletion crates/sdk/src/client/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl ProverClientBuilder<None> {
}

pub fn from_env(self) -> ProverClient {
ProverClient::create_from_env()
ProverClient::from_env()
}
}

Expand Down
13 changes: 6 additions & 7 deletions examples/fibonacci/script/bin/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ async fn main() {
let mut stdin = SP1Stdin::new();
stdin.write(&n);

dotenv().ok();
// dotenv().ok();

let rpc_url = std::env::var("PROVER_NETWORK_RPC").unwrap();
let private_key = std::env::var("SP1_PRIVATE_KEY").unwrap();
// let rpc_url = std::env::var("PROVER_NETWORK_RPC").unwrap();
// let private_key = std::env::var("SP1_PRIVATE_KEY").unwrap();


let client = ProverClient::builder()
.from_env();
// let client = ProverClient::builder()
// .from_env();

// Generate the proof, using the specified network configuration.
let client = ProverClient::builder()
Expand All @@ -44,7 +43,7 @@ async fn main() {
let proof_result = client
.prove(&pk, stdin)
.compressed()
.timeout(10)
.timeout(100)
.cycle_limit(20_000)
.await;

Expand Down

0 comments on commit 8e3c1f1

Please sign in to comment.