@@ -78,17 +78,16 @@ library DAVerifier {
7878 /// @notice Verifies that the shares, which were posted to Celestia, were committed to by the Blobstream smart contract.
7979 /// @param _bridge The Blobstream smart contract instance.
8080 /// @param _sharesProof The proof of the shares to the data root tuple root.
81- /// @param _root The data root of the block that contains the shares.
8281 /// @return `true` if the proof is valid, `false` otherwise.
8382 /// @return an error code if the proof is invalid, ErrorCodes.NoError otherwise.
84- function verifySharesToDataRootTupleRoot (IDAOracle _bridge , SharesProof memory _sharesProof , bytes32 _root )
83+ function verifySharesToDataRootTupleRoot (IDAOracle _bridge , SharesProof memory _sharesProof )
8584 internal
8685 view
8786 returns (bool , ErrorCodes)
8887 {
8988 // checking that the data root was committed to by the Blobstream smart contract.
9089 (bool success , ErrorCodes errorCode ) = verifyMultiRowRootsToDataRootTupleRoot (
91- _bridge, _sharesProof.rowRoots, _sharesProof.rowProofs, _sharesProof.attestationProof, _root
90+ _bridge, _sharesProof.rowRoots, _sharesProof.rowProofs, _sharesProof.attestationProof
9291 );
9392 if (! success) {
9493 return (false , errorCode);
@@ -100,7 +99,7 @@ library DAVerifier {
10099 _sharesProof.namespace,
101100 _sharesProof.rowRoots,
102101 _sharesProof.rowProofs,
103- _root
102+ _sharesProof.attestationProof.tuple.dataRoot
104103 );
105104
106105 return (valid, error );
@@ -164,15 +163,13 @@ library DAVerifier {
164163 /// @param _bridge The Blobstream smart contract instance.
165164 /// @param _rowRoot The row/column root to be proven.
166165 /// @param _rowProof The proof of the row/column root to the data root.
167- /// @param _root The data root of the block that contains the row.
168166 /// @return `true` if the proof is valid, `false` otherwise.
169167 /// @return an error code if the proof is invalid, ErrorCodes.NoError otherwise.
170168 function verifyRowRootToDataRootTupleRoot (
171169 IDAOracle _bridge ,
172170 NamespaceNode memory _rowRoot ,
173171 BinaryMerkleProof memory _rowProof ,
174- AttestationProof memory _attestationProof ,
175- bytes32 _root
172+ AttestationProof memory _attestationProof
176173 ) internal view returns (bool , ErrorCodes) {
177174 // checking that the data root was committed to by the Blobstream smart contract
178175 if (
@@ -183,7 +180,8 @@ library DAVerifier {
183180 return (false , ErrorCodes.InvalidDataRootTupleToDataRootTupleRootProof);
184181 }
185182
186- (bool valid , ErrorCodes error ) = verifyRowRootToDataRootTupleRootProof (_rowRoot, _rowProof, _root);
183+ (bool valid , ErrorCodes error ) =
184+ verifyRowRootToDataRootTupleRootProof (_rowRoot, _rowProof, _attestationProof.tuple.dataRoot);
187185
188186 return (valid, error );
189187 }
@@ -213,15 +211,13 @@ library DAVerifier {
213211 /// @param _bridge The Blobstream smart contract instance.
214212 /// @param _rowRoots The set of row/column roots to be proved.
215213 /// @param _rowProofs The set of proofs of the _rowRoots in the same order.
216- /// @param _root The data root of the block that contains the rows.
217214 /// @return `true` if the proof is valid, `false` otherwise.
218215 /// @return an error code if the proof is invalid, ErrorCodes.NoError otherwise.
219216 function verifyMultiRowRootsToDataRootTupleRoot (
220217 IDAOracle _bridge ,
221218 NamespaceNode[] memory _rowRoots ,
222219 BinaryMerkleProof[] memory _rowProofs ,
223- AttestationProof memory _attestationProof ,
224- bytes32 _root
220+ AttestationProof memory _attestationProof
225221 ) internal view returns (bool , ErrorCodes) {
226222 // checking that the data root was committed to by the Blobstream smart contract
227223 if (
@@ -233,7 +229,8 @@ library DAVerifier {
233229 }
234230
235231 // checking that the rows roots commit to the data root.
236- (bool valid , ErrorCodes error ) = verifyMultiRowRootsToDataRootTupleRootProof (_rowRoots, _rowProofs, _root);
232+ (bool valid , ErrorCodes error ) =
233+ verifyMultiRowRootsToDataRootTupleRootProof (_rowRoots, _rowProofs, _attestationProof.tuple.dataRoot);
237234
238235 return (valid, error );
239236 }
0 commit comments