Skip to content

Commit feb7df1

Browse files
committed
feat(provers/sp1): hardcode sp1_proof_mode
1 parent afc43b7 commit feb7df1

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

Diff for: provers/sp1/driver/src/lib.rs

+16-4
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ impl Prover for Sp1Prover {
121121
config: &ProverConfig,
122122
id_store: Option<&mut dyn IdWrite>,
123123
) -> ProverResult<Proof> {
124-
let param = Sp1Param::deserialize(config.get("sp1").unwrap()).unwrap();
124+
let mut param = Sp1Param::deserialize(config.get("sp1").unwrap()).unwrap();
125+
126+
// TODO: remove param.recursion, hardcode to Plonk
127+
param.recursion = RecursionMode::Compressed;
128+
125129
let mode = param.prover.clone().unwrap_or_else(get_env_mock);
126130

127131
println!("param: {param:?}");
@@ -290,7 +294,11 @@ impl Prover for Sp1Prover {
290294
config: &ProverConfig,
291295
_store: Option<&mut dyn IdWrite>,
292296
) -> ProverResult<Proof> {
293-
let param = Sp1Param::deserialize(config.get("sp1").unwrap()).unwrap();
297+
let mut param = Sp1Param::deserialize(config.get("sp1").unwrap()).unwrap();
298+
299+
// TODO: remove param.recursion, hardcode to Plonk
300+
param.recursion = RecursionMode::Plonk;
301+
294302
let mode = param.prover.clone().unwrap_or_else(get_env_mock);
295303
let block_inputs: Vec<B256> = input
296304
.proofs
@@ -323,7 +331,7 @@ impl Prover for Sp1Prover {
323331
stdin.write_proof(*block_proof, stark_vk.clone());
324332
}
325333
_ => {
326-
panic!("unsupported proof type for aggregation: {sp1_proof:?}");
334+
tracing::error!("unsupported proof type for aggregation: {sp1_proof:?}");
327335
}
328336
}
329337
}
@@ -440,7 +448,11 @@ impl Prover for Sp1Prover {
440448
config: &ProverConfig,
441449
id_store: Option<&mut dyn IdWrite>,
442450
) -> ProverResult<Proof> {
443-
let param = Sp1Param::deserialize(config.get("sp1").unwrap()).unwrap();
451+
let mut param = Sp1Param::deserialize(config.get("sp1").unwrap()).unwrap();
452+
453+
// TODO: remove param.recursion, hardcode to Compressed
454+
param.recursion = RecursionMode::Compressed;
455+
444456
let mode = param.prover.clone().unwrap_or_else(get_env_mock);
445457

446458
println!("batch_run param: {param:?}");

0 commit comments

Comments
 (0)