File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import {UUPSUpgradeable} from "@openzeppelin-upgrades/contracts/proxy/utils/UUPS
77import {IAlignedProofAggregationService} from "./IAlignedProofAggregationService.sol " ;
88import {ISP1Verifier} from "@sp1-contracts/ISP1Verifier.sol " ;
99import {IRiscZeroVerifier} from "@risc0-contracts/IRiscZeroVerifier.sol " ;
10+ import {MerkleProof} from "../../lib/openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol " ;
1011
1112contract AlignedProofAggregationService is
1213 IAlignedProofAggregationService ,
@@ -89,6 +90,11 @@ contract AlignedProofAggregationService is
8990 emit AggregatedProofVerified (merkleRoot, blobVersionedHash);
9091 }
9192
93+ function verifyProofInclusion (bytes32 [] calldata merklePath , bytes32 proofCommitment ) public view returns (bool ) {
94+ bytes32 merkleRoot = MerkleProof.processProofCalldata (merklePath, proofCommitment);
95+ return aggregatedProofs[merkleRoot];
96+ }
97+
9298 function _isSP1VerificationEnabled () internal view returns (bool ) {
9399 return sp1VerifierAddress != VERIFIER_MOCK_ADDRESS;
94100 }
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ interface IAlignedProofAggregationService {
2222 bytes calldata risc0JournalBytes
2323 ) external ;
2424
25+ function verifyProofInclusion (bytes32 [] calldata merklePath , bytes32 proofCommitment )
26+ external
27+ view
28+ returns (bool );
29+
2530 /// @notice event that gets emitted after a successful aggregated proof verification
2631 event AggregatedProofVerified (bytes32 indexed merkleRoot , bytes32 blobVersionedHash );
2732
You can’t perform that action at this time.
0 commit comments