Skip to content

Commit b5aeb01

Browse files
committed
chore: make sp1 aggregation work on dev mode
1 parent eb94954 commit b5aeb01

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

aggregation_mode/src/aggregators/sp1_aggregator.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,17 @@ pub(crate) fn run_root_aggregator(
143143

144144
let (pk, vk) = client.setup(ROOT_PROGRAM_ELF);
145145

146+
// In mock mode, deferred proof verification must be disabled to avoid recursive proof verification.
147+
// This is because chunk proofs are mocked, and enabling verification would cause a panic.
148+
// See: https://docs.succinct.xyz/docs/sp1/writing-programs/proof-aggregation#proof-aggregation-in-mock-mode
149+
#[cfg(feature = "prove")]
150+
let deferred_proof_verification = true;
151+
#[cfg(not(feature = "prove"))]
152+
let deferred_proof_verification = false;
153+
146154
let proof = client
147155
.prove(&pk, &stdin)
156+
.deferred_proof_verification(deferred_proof_verification)
148157
.groth16()
149158
.run()
150159
.map_err(|e| SP1AggregationError::Prove(e.to_string()))?;

0 commit comments

Comments
 (0)