@@ -27,8 +27,8 @@ impl SP1Proof {
2727}
2828
2929pub struct SP1AggregationInput {
30- proofs : Vec < SP1Proof > ,
31- merkle_root : [ u8 ; 32 ] ,
30+ pub proofs : Vec < SP1Proof > ,
31+ pub merkle_root : [ u8 ; 32 ] ,
3232}
3333
3434pub ( crate ) fn aggregate_proofs (
@@ -86,15 +86,22 @@ pub(crate) fn aggregate_proofs(
8686 Ok ( output)
8787}
8888
89+ #[ derive( Debug ) ]
8990pub enum SP1VerificationError {
9091 Verification ( sp1_sdk:: SP1VerificationError ) ,
92+ UnsupportedProof ,
9193}
9294
93- pub ( crate ) fn verify ( proof : & SP1Proof , elf : & [ u8 ] ) -> Result < ( ) , SP1VerificationError > {
95+ pub ( crate ) fn verify ( sp1_proof : & SP1Proof , elf : & [ u8 ] ) -> Result < ( ) , SP1VerificationError > {
9496 let client = ProverClient :: from_env ( ) ;
9597
9698 let ( _pk, vk) = client. setup ( elf) ;
97- client
98- . verify ( & proof. proof , & vk)
99- . map_err ( SP1VerificationError :: Verification )
99+
100+ // only sp1 compressed proofs are supported for aggregation now
101+ match sp1_proof. proof . proof {
102+ sp1_sdk:: SP1Proof :: Compressed ( _) => client
103+ . verify ( & sp1_proof. proof , & vk)
104+ . map_err ( SP1VerificationError :: Verification ) ,
105+ _ => Err ( SP1VerificationError :: UnsupportedProof ) ,
106+ }
100107}
0 commit comments