@@ -78,17 +78,16 @@ library DAVerifier {
78
78
/// @notice Verifies that the shares, which were posted to Celestia, were committed to by the Blobstream smart contract.
79
79
/// @param _bridge The Blobstream smart contract instance.
80
80
/// @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.
82
81
/// @return `true` if the proof is valid, `false` otherwise.
83
82
/// @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 )
85
84
internal
86
85
view
87
86
returns (bool , ErrorCodes)
88
87
{
89
88
// checking that the data root was committed to by the Blobstream smart contract.
90
89
(bool success , ErrorCodes errorCode ) = verifyMultiRowRootsToDataRootTupleRoot (
91
- _bridge, _sharesProof.rowRoots, _sharesProof.rowProofs, _sharesProof.attestationProof, _root
90
+ _bridge, _sharesProof.rowRoots, _sharesProof.rowProofs, _sharesProof.attestationProof
92
91
);
93
92
if (! success) {
94
93
return (false , errorCode);
@@ -100,7 +99,7 @@ library DAVerifier {
100
99
_sharesProof.namespace,
101
100
_sharesProof.rowRoots,
102
101
_sharesProof.rowProofs,
103
- _root
102
+ _sharesProof.attestationProof.tuple.dataRoot
104
103
);
105
104
106
105
return (valid, error );
@@ -164,15 +163,13 @@ library DAVerifier {
164
163
/// @param _bridge The Blobstream smart contract instance.
165
164
/// @param _rowRoot The row/column root to be proven.
166
165
/// @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.
168
166
/// @return `true` if the proof is valid, `false` otherwise.
169
167
/// @return an error code if the proof is invalid, ErrorCodes.NoError otherwise.
170
168
function verifyRowRootToDataRootTupleRoot (
171
169
IDAOracle _bridge ,
172
170
NamespaceNode memory _rowRoot ,
173
171
BinaryMerkleProof memory _rowProof ,
174
- AttestationProof memory _attestationProof ,
175
- bytes32 _root
172
+ AttestationProof memory _attestationProof
176
173
) internal view returns (bool , ErrorCodes) {
177
174
// checking that the data root was committed to by the Blobstream smart contract
178
175
if (
@@ -183,7 +180,8 @@ library DAVerifier {
183
180
return (false , ErrorCodes.InvalidDataRootTupleToDataRootTupleRootProof);
184
181
}
185
182
186
- (bool valid , ErrorCodes error ) = verifyRowRootToDataRootTupleRootProof (_rowRoot, _rowProof, _root);
183
+ (bool valid , ErrorCodes error ) =
184
+ verifyRowRootToDataRootTupleRootProof (_rowRoot, _rowProof, _attestationProof.tuple.dataRoot);
187
185
188
186
return (valid, error );
189
187
}
@@ -213,15 +211,13 @@ library DAVerifier {
213
211
/// @param _bridge The Blobstream smart contract instance.
214
212
/// @param _rowRoots The set of row/column roots to be proved.
215
213
/// @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.
217
214
/// @return `true` if the proof is valid, `false` otherwise.
218
215
/// @return an error code if the proof is invalid, ErrorCodes.NoError otherwise.
219
216
function verifyMultiRowRootsToDataRootTupleRoot (
220
217
IDAOracle _bridge ,
221
218
NamespaceNode[] memory _rowRoots ,
222
219
BinaryMerkleProof[] memory _rowProofs ,
223
- AttestationProof memory _attestationProof ,
224
- bytes32 _root
220
+ AttestationProof memory _attestationProof
225
221
) internal view returns (bool , ErrorCodes) {
226
222
// checking that the data root was committed to by the Blobstream smart contract
227
223
if (
@@ -233,7 +229,8 @@ library DAVerifier {
233
229
}
234
230
235
231
// 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);
237
234
238
235
return (valid, error );
239
236
}
0 commit comments