Skip to content

Commit cbe4ffa

Browse files
fix: using SP1_PROVER to modulate Prover::Config::recursive_proofs
1 parent eb17ca3 commit cbe4ffa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

crates/cli/src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,16 @@ async fn main() -> std::io::Result<()> {
6969
verifying_key.to_bytes().to_base64()
7070
);
7171

72+
// When SP1_PROVER is set to mock, disable recursive proofs
73+
let recursive_proofs = std::env::var("SP1_PROVER").map_or(true, |val| val != "mock");
7274
let prover_cfg = prism_prover::Config {
7375
prover: true,
7476
batcher: true,
7577
webserver: config.webserver.unwrap_or_default(),
7678
signing_key,
7779
verifying_key,
7880
start_height,
81+
recursive_proofs,
7982
};
8083

8184
Arc::new(Prover::new(db, da, &prover_cfg).map_err(|e| {
@@ -102,13 +105,16 @@ async fn main() -> std::io::Result<()> {
102105
.verifying_key
103106
.ok_or_else(|| Error::new(ErrorKind::NotFound, "prover verifying key not found"))?;
104107

108+
// When SP1_PROVER is set to mock, disable recursive proofs
109+
let recursive_proofs = std::env::var("SP1_PROVER").map_or(true, |val| val != "mock");
105110
let prover_cfg = prism_prover::Config {
106111
prover: false,
107112
batcher: true,
108113
webserver: config.webserver.unwrap_or_default(),
109114
signing_key,
110115
verifying_key,
111116
start_height,
117+
recursive_proofs,
112118
};
113119

114120
Arc::new(Prover::new(db, da, &prover_cfg).map_err(|e| {

crates/node_types/prover/src/prover/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ pub struct Config {
6666
/// DA layer height the prover should start syncing transactions from.
6767
pub start_height: u64,
6868

69+
/// Whether recursive proofs should be enabled - defaults to true, unless SP1_PROVER env var is set to "mock"
6970
pub recursive_proofs: bool,
7071
}
7172

@@ -80,7 +81,7 @@ impl Default for Config {
8081
signing_key: signing_key.clone(),
8182
verifying_key: signing_key.verifying_key(),
8283
start_height: 1,
83-
recursive_proofs: false,
84+
recursive_proofs: true,
8485
}
8586
}
8687
}
@@ -105,7 +106,7 @@ impl Config {
105106
signing_key: signing_key.clone(),
106107
verifying_key: signing_key.verifying_key(),
107108
start_height: 1,
108-
recursive_proofs: false,
109+
recursive_proofs: true,
109110
})
110111
}
111112
}

0 commit comments

Comments
 (0)