Skip to content

Commit

Permalink
feat: clear stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Dec 21, 2024
1 parent fbc15cf commit caa9d34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions proposer/succinct/bin/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use sp1_sdk::{
client::NetworkClient,
proto::network::{ExecutionStatus, FulfillmentStatus, FulfillmentStrategy, ProofMode},
},
utils, HashableKey, NetworkProverV2, ProverClient, SP1Proof, SP1ProofWithPublicValues,
utils, HashableKey, NetworkProverV2, ProverClient, SP1Proof, SP1ProofWithPublicValues, SP1Stdin,
};
use std::{env, str::FromStr, time::Duration};
use tower_http::limit::RequestBodyLimitLayer;
Expand Down Expand Up @@ -540,7 +540,10 @@ async fn get_proof_status(
let fulfillment_status = status.fulfillment_status;
let execution_status = status.execution_status;
if fulfillment_status == FulfillmentStatus::Fulfilled as i32 {
let proof: SP1ProofWithPublicValues = maybe_proof.unwrap();
let mut proof: SP1ProofWithPublicValues = maybe_proof.unwrap();
// Remove the stdin from the proof, as it's unnecessary for verification. Note: In v4, there is no stdin.
// Previously, this caused the memory usage of the proposer to be high.
proof.stdin = SP1Stdin::default();

match proof.proof {
SP1Proof::Compressed(_) => {
Expand Down

0 comments on commit caa9d34

Please sign in to comment.