@@ -13,17 +13,17 @@ use sha3::{Digest, Keccak256};
1313const FROM_BLOCKS_AGO_DEFAULT : u64 = 7500 ;
1414
1515#[ derive( Debug ) ]
16- pub enum ProofData {
16+ pub enum AggregationModeVerificationData {
1717 SP1 {
1818 vk : [ u8 ; 32 ] ,
1919 public_inputs : Vec < u8 > ,
2020 } ,
2121}
2222
23- impl ProofData {
23+ impl AggregationModeVerificationData {
2424 fn commitment ( & self ) -> [ u8 ; 32 ] {
2525 match self {
26- ProofData :: SP1 { vk, public_inputs } => {
26+ AggregationModeVerificationData :: SP1 { vk, public_inputs } => {
2727 let mut hasher = Keccak256 :: new ( ) ;
2828 hasher. update ( vk) ;
2929 hasher. update ( public_inputs) ;
@@ -43,11 +43,11 @@ pub enum ProofVerificationAggModeError {
4343 EventDecoding ,
4444}
4545
46- /// Given the [`ProofData `], this function checks whether a proof was included
47- /// in the most recent aggregated proof and verifies the corresponding Merkle root commitment.
46+ /// Given the [`AggregationModeVerificationData `], this function checks whether the proof was included in a
47+ /// in a recent aggregated proof and verifies the corresponding Merkle root commitment.
4848///
4949/// Note: This functionality is currently in Beta. As a result, we cannot determine with certainty
50- /// which specific aggregation a proof belongs to. Instead, we optimistically check the from the specified `from_block`.
50+ /// which specific aggregation a proof belongs to. Instead, we check the events from the specified `from_block`.
5151///
5252/// Note: The `from_block` must not be older than 18 days,
5353/// as blobs expire after that period and will no longer be retrievable.
@@ -62,7 +62,7 @@ pub enum ProofVerificationAggModeError {
6262/// 6. Checking if the given proof commitment exists within the blob’s proofs
6363/// 7. Reconstructing the Merkle root and verifying it against the root stored in the contract
6464pub async fn is_proof_verified_in_aggregation_mode (
65- proof_data : ProofData ,
65+ verification_data : AggregationModeVerificationData ,
6666 network : Network ,
6767 eth_rpc_url : String ,
6868 beacon_client_url : String ,
@@ -140,7 +140,7 @@ pub async fn is_proof_verified_in_aggregation_mode(
140140 hex:: decode ( blob_data. blob . replace ( "0x" , "" ) ) . expect ( "A valid hex encoded data" ) ;
141141 let proof_commitments = decoded_blob ( blob_bytes) ;
142142
143- if proof_commitments. contains ( & proof_data . commitment ( ) ) {
143+ if proof_commitments. contains ( & verification_data . commitment ( ) ) {
144144 if verify_blob_merkle_root ( proof_commitments, merkle_root) {
145145 return Ok ( merkle_root) ;
146146 } else {
0 commit comments