@@ -6,11 +6,12 @@ use sp1_sdk::{
66
77use super :: lib:: { AggregatedProof , ProgramOutput , ProofAggregationError } ;
88
9- const PROGRAM_ELF : & [ u8 ] = include_bytes ! ( "../../aggregation_programs/sp1/elf/sp1_aggregator_program" ) ;
9+ const PROGRAM_ELF : & [ u8 ] =
10+ include_bytes ! ( "../../aggregation_programs/sp1/elf/sp1_aggregator_program" ) ;
1011
1112pub struct SP1ProofWithPubValuesAndElf {
1213 pub proof_with_pub_values : SP1ProofWithPublicValues ,
13- pub elf : Vec < u8 >
14+ pub elf : Vec < u8 > ,
1415}
1516
1617impl SP1ProofWithPubValuesAndElf {
@@ -98,15 +99,23 @@ pub enum AlignedSP1VerificationError {
9899 UnsupportedProof ,
99100}
100101
101- pub ( crate ) fn verify ( sp1_proof_with_pub_values_and_elf : & SP1ProofWithPubValuesAndElf ) -> Result < ( ) , AlignedSP1VerificationError > {
102+ pub ( crate ) fn verify (
103+ sp1_proof_with_pub_values_and_elf : & SP1ProofWithPubValuesAndElf ,
104+ ) -> Result < ( ) , AlignedSP1VerificationError > {
102105 let client = ProverClient :: from_env ( ) ;
103106
104107 let ( _pk, vk) = client. setup ( & sp1_proof_with_pub_values_and_elf. elf ) ;
105108
106109 // only sp1 compressed proofs are supported for aggregation now
107- match sp1_proof_with_pub_values_and_elf. proof_with_pub_values . proof {
110+ match sp1_proof_with_pub_values_and_elf
111+ . proof_with_pub_values
112+ . proof
113+ {
108114 sp1_sdk:: SP1Proof :: Compressed ( _) => client
109- . verify ( & sp1_proof_with_pub_values_and_elf. proof_with_pub_values , & vk)
115+ . verify (
116+ & sp1_proof_with_pub_values_and_elf. proof_with_pub_values ,
117+ & vk,
118+ )
110119 . map_err ( AlignedSP1VerificationError :: Verification ) ,
111120 _ => Err ( AlignedSP1VerificationError :: UnsupportedProof ) ,
112121 }
0 commit comments