Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed Dec 12, 2024
1 parent 2ffec90 commit 7536cd7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
11 changes: 4 additions & 7 deletions crates/sdk/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
use crate::{
local::LocalProver,
proof::SP1ProofWithPublicValues,
prover::Prover,
SP1VerificationError,
local::LocalProver, proof::SP1ProofWithPublicValues, prover::Prover, SP1VerificationError,
};

#[cfg(feature = "network-v2")]
use crate::network_v2::{NetworkProver, DEFAULT_PROVER_NETWORK_RPC};

use crate::ProofOpts;
use anyhow::Result;
use sp1_core_executor::{ExecutionError, ExecutionReport};
use sp1_core_machine::io::SP1Stdin;
use sp1_primitives::io::SP1PublicValues;
use sp1_prover::{SP1ProvingKey, SP1VerifyingKey};
use std::sync::Arc;
use crate::ProofOpts;
use std::{env, sync::Arc};

mod request;
pub use request::DynProofRequest;
mod builder;
pub use builder::{ProverClientBuilder, None};
pub use builder::{None, ProverClientBuilder};

pub struct ProverClient {
inner: Box<dyn Prover>,
Expand Down
3 changes: 1 addition & 2 deletions crates/sdk/src/local/cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ use sp1_prover::{components::DefaultProverComponents, SP1Prover};

use crate::install::try_install_circuit_artifacts;
use crate::{
opts::ProofOpts,
proof::{SP1Proof, SP1ProofKind, SP1ProofWithPublicValues},
SP1Context, SP1ProvingKey, SP1VerifyingKey,
ProofOpts, SP1Context, SP1ProvingKey, SP1VerifyingKey,
};

/// An implementation of [crate::ProverClient] that can generate proofs locally using CUDA.
Expand Down
6 changes: 3 additions & 3 deletions crates/sdk/src/network-v2/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use crate::network_v2::{
};
use crate::proof::SP1ProofWithPublicValues;
use crate::prover::Prover;
use crate::SP1VerificationError;
use crate::{verify, ProofOpts};
use crate::{Mode, SP1VerificationError};
use crate::{DEFAULT_CYCLE_LIMIT, DEFAULT_TIMEOUT};

/// The default fulfillment strategy to use for proof requests.
Expand Down Expand Up @@ -77,7 +77,7 @@ impl NetworkProver {
&self.prover
}

/// Create a new proof request.
/// Create a new proof request. See [`NetworkProofRequest`] for more details.
pub fn prove<'a>(&'a self, pk: &'a SP1ProvingKey, stdin: SP1Stdin) -> NetworkProofRequest<'a> {
NetworkProofRequest::new(self, pk, stdin)
}
Expand All @@ -86,7 +86,7 @@ impl NetworkProver {
impl NetworkProver {
/// Get the timeout to used for a proof request.
///
/// Clamps the given timeout to the minimum [`MIN_TIMEOUT`] and maximum [`MAX_TIMEOUT`] allowed values.
/// Clamps the given timeout to the minimum [`MIN_TIMEOUT`] and maximum [`MAX_TIMEOUT`] values.
pub fn get_timeout(&self) -> u64 {
self.timeout.clamp(MIN_TIMEOUT, MAX_TIMEOUT)
}
Expand Down

0 comments on commit 7536cd7

Please sign in to comment.