diff --git a/src/lib/verifier/DAVerifier.sol b/src/lib/verifier/DAVerifier.sol index d896cb9..7280be3 100644 --- a/src/lib/verifier/DAVerifier.sol +++ b/src/lib/verifier/DAVerifier.sol @@ -163,15 +163,13 @@ library DAVerifier { /// @param _bridge The Blobstream smart contract instance. /// @param _rowRoot The row/column root to be proven. /// @param _rowProof The proof of the row/column root to the data root. - /// @param _root The data root of the block that contains the row. /// @return `true` if the proof is valid, `false` otherwise. /// @return an error code if the proof is invalid, ErrorCodes.NoError otherwise. function verifyRowRootToDataRootTupleRoot( IDAOracle _bridge, NamespaceNode memory _rowRoot, BinaryMerkleProof memory _rowProof, - AttestationProof memory _attestationProof, - bytes32 _root + AttestationProof memory _attestationProof ) internal view returns (bool, ErrorCodes) { // checking that the data root was committed to by the Blobstream smart contract if ( @@ -182,7 +180,8 @@ library DAVerifier { return (false, ErrorCodes.InvalidDataRootTupleToDataRootTupleRootProof); } - (bool valid, ErrorCodes error) = verifyRowRootToDataRootTupleRootProof(_rowRoot, _rowProof, _root); + (bool valid, ErrorCodes error) = + verifyRowRootToDataRootTupleRootProof(_rowRoot, _rowProof, _attestationProof.tuple.dataRoot); return (valid, error); } diff --git a/src/lib/verifier/test/DAVerifier.t.sol b/src/lib/verifier/test/DAVerifier.t.sol index c247e4a..3246027 100644 --- a/src/lib/verifier/test/DAVerifier.t.sol +++ b/src/lib/verifier/test/DAVerifier.t.sol @@ -137,11 +137,7 @@ contract DAVerifierTest is DSTest { ); (bool valid, DAVerifier.ErrorCodes errorCode) = DAVerifier.verifyRowRootToDataRootTupleRoot( - bridge, - fixture.getFirstRowRootNode(), - fixture.getRowRootToDataRootProof(), - attestationProof, - fixture.dataRoot() + bridge, fixture.getFirstRowRootNode(), fixture.getRowRootToDataRootProof(), attestationProof ); assertTrue(valid); assertEq(uint8(errorCode), uint8(DAVerifier.ErrorCodes.NoError)); diff --git a/src/lib/verifier/test/RollupInclusionProofs.t.sol b/src/lib/verifier/test/RollupInclusionProofs.t.sol index 665f958..1715a1f 100644 --- a/src/lib/verifier/test/RollupInclusionProofs.t.sol +++ b/src/lib/verifier/test/RollupInclusionProofs.t.sol @@ -268,11 +268,7 @@ contract RollupInclusionProofTest is DSTest { ); bool success; (success, error) = DAVerifier.verifyRowRootToDataRootTupleRoot( - bridge, - fixture.getFirstRowRootNode(), - fixture.getRowRootToDataRootProof(), - attestationProof, - fixture.dataRoot() + bridge, fixture.getFirstRowRootNode(), fixture.getRowRootToDataRootProof(), attestationProof ); assertTrue(success); assertEq(uint8(error), uint8(DAVerifier.ErrorCodes.NoError));