File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
aggregation_mode/src/aggregators Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ impl ProgramOutput {
2727pub enum ProofAggregationError {
2828 SP1Verification ( sp1_sdk:: SP1VerificationError ) ,
2929 SP1Proving ,
30- Risc0Proving ,
30+ Risc0Proving ( String ) ,
3131 UnsupportedProof ,
3232}
3333
Original file line number Diff line number Diff line change @@ -66,16 +66,17 @@ pub(crate) fn aggregate_proofs(
6666 } ;
6767 env_builder
6868 . write ( & input)
69- . map_err ( |_ | ProofAggregationError :: Risc0Proving ) ?;
69+ . map_err ( |e | ProofAggregationError :: Risc0Proving ( e . to_string ( ) ) ) ?;
7070
7171 let env = env_builder
7272 . build ( )
73- . map_err ( |_ | ProofAggregationError :: Risc0Proving ) ?;
73+ . map_err ( |e | ProofAggregationError :: Risc0Proving ( e . to_string ( ) ) ) ?;
7474
7575 let prover = default_prover ( ) ;
76+
7677 let receipt = prover
7778 . prove_with_opts ( env, RISC0_AGGREGATOR_PROGRAM_ELF , & ProverOpts :: groth16 ( ) )
78- . map_err ( |_ | ProofAggregationError :: Risc0Proving ) ?
79+ . map_err ( |e | ProofAggregationError :: Risc0Proving ( e . to_string ( ) ) ) ?
7980 . receipt ;
8081
8182 let output = Risc0ProofReceiptAndImageId {
@@ -95,13 +96,13 @@ pub enum AlignedRisc0VerificationError {
9596pub ( crate ) fn verify (
9697 proof : & Risc0ProofReceiptAndImageId ,
9798) -> Result < ( ) , AlignedRisc0VerificationError > {
98- // only composite proofs are supported for recursion
99- if proof. receipt . inner . composite ( ) . is_err ( ) {
100- Err ( AlignedRisc0VerificationError :: UnsupportedProof )
101- } else {
99+ // only stark proofs are supported for recursion
100+ if proof. receipt . inner . composite ( ) . is_ok ( ) || proof. receipt . inner . succinct ( ) . is_ok ( ) {
102101 proof
103102 . receipt
104103 . verify ( proof. image_id )
105104 . map_err ( |e| AlignedRisc0VerificationError :: Verification ( e. to_string ( ) ) )
105+ } else {
106+ Err ( AlignedRisc0VerificationError :: UnsupportedProof )
106107 }
107108}
You can’t perform that action at this time.
0 commit comments