Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed Dec 7, 2024
1 parent 797501d commit e2b3a3a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions examples/fibonacci/script/bin/network.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use sp1_sdk::network_v2::prover::NetworkProver;
use sp1_sdk::Prover;
use sp1_sdk::SP1Stdin;
use sp1_sdk::{
include_elf,
network_v2::{proto::network::FulfillmentStrategy, Error},
utils, ProverClient,
network_v2::{
prover::NetworkProver,
proto::network::FulfillmentStrategy,
Error,
},
utils,
SP1Stdin,
Prover
};
use std::env;
use tokio;
Expand Down Expand Up @@ -33,17 +36,17 @@ async fn main() {
let mut stdin = SP1Stdin::new();
stdin.write(&1000u32);

// Send the proof request to the prover network.
// Send the proof request to the prover network, with examples of how to handle errors.
let proof_result = prover.prove(&pk, stdin).await;
let mut proof = match proof_result {
Ok(proof) => proof,
Err(e) => match e {
Error::RequestUnexecutable => {
eprintln!("Program is not executable. Check your input parameters");
eprintln!("Error executing: {}", e);
std::process::exit(1);
}
Error::RequestUnfulfillable => {
eprintln!("No prover available to fulfill the request. Try again later");
eprintln!("Error proving: {}", e);
std::process::exit(1);
}
_ => {
Expand Down

0 comments on commit e2b3a3a

Please sign in to comment.