Skip to content

Commit

Permalink
refactor: ProverClient::remote -> ProverClient::network (succinctlabs…
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani authored May 30, 2024
2 parents 2ce75c6 + f0a9f2f commit 3c0dae8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion book/generating-proofs/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To use the prover network to generate a proof, you can run your program as you w
SP1_PROVER=network SP1_PRIVATE_KEY=... cargo run --release
```

- `SP1_PROVER` can be set to `network` or `local`, and defaults to local.
- `SP1_PROVER` should be set to `network` when using the prover network.

- `SP1_PRIVATE_KEY` is your secp256k1 private key for signing messages on the network. The balance of
the address corresponding to this private key will be used to pay for the proof request.
Expand Down
9 changes: 5 additions & 4 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl ProverClient {
/// Setting the `SP1_PROVER` enviroment variable can change the prover used under the hood.
/// - `local` (default): Uses [LocalProver]. Recommended for proving end-to-end locally.
/// - `mock`: Uses [MockProver]. Recommended for testing and development.
/// - `remote`: Uses [NetworkProver]. Recommended for outsourcing proof generation to an RPC.
/// - `network`: Uses [NetworkProver]. Recommended for outsourcing proof generation to an RPC.
///
/// ### Examples
///
Expand All @@ -89,7 +89,7 @@ impl ProverClient {
prover: Box::new(NetworkProver::new()),
},
_ => panic!(
"invalid value for SP1_PROVER enviroment variable: expected 'local', 'mock', or 'remote'"
"invalid value for SP1_PROVER enviroment variable: expected 'local', 'mock', or 'network'"
),
}
}
Expand Down Expand Up @@ -133,15 +133,16 @@ impl ProverClient {
/// Creates a new [ProverClient] with the network prover.
///
/// Recommended for outsourcing proof generation to an RPC. You can also use [ProverClient::new]
/// to set the prover to `network` with the `SP1_PROVER` enviroment variable.
///
/// ### Examples
///
/// ```no_run
/// use sp1_sdk::ProverClient;
///
/// let client = ProverClient::remote();
/// let client = ProverClient::network();
/// ```
pub fn remote() -> Self {
pub fn network() -> Self {
Self {
prover: Box::new(NetworkProver::new()),
}
Expand Down

0 comments on commit 3c0dae8

Please sign in to comment.