Skip to content

Commit d05ac29

Browse files
authored
feat(proposer): clear stdin (#301)
* feat: clear stdin * cargo fmt
1 parent fbc15cf commit d05ac29

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

proposer/succinct/bin/server.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use sp1_sdk::{
2828
proto::network::{ExecutionStatus, FulfillmentStatus, FulfillmentStrategy, ProofMode},
2929
},
3030
utils, HashableKey, NetworkProverV2, ProverClient, SP1Proof, SP1ProofWithPublicValues,
31+
SP1Stdin,
3132
};
3233
use std::{env, str::FromStr, time::Duration};
3334
use tower_http::limit::RequestBodyLimitLayer;
@@ -540,7 +541,10 @@ async fn get_proof_status(
540541
let fulfillment_status = status.fulfillment_status;
541542
let execution_status = status.execution_status;
542543
if fulfillment_status == FulfillmentStatus::Fulfilled as i32 {
543-
let proof: SP1ProofWithPublicValues = maybe_proof.unwrap();
544+
let mut proof: SP1ProofWithPublicValues = maybe_proof.unwrap();
545+
// Remove the stdin from the proof, as it's unnecessary for verification. Note: In v4, there is no stdin.
546+
// Previously, this caused the memory usage of the proposer to be high.
547+
proof.stdin = SP1Stdin::default();
544548

545549
match proof.proof {
546550
SP1Proof::Compressed(_) => {

0 commit comments

Comments
 (0)