Closed zhiqiangxu closed 6 months ago
The update in the code involves refining the function parameters in DAVerifier.sol
to enhance data handling clarity. This change streamlines the usage of data references and improves consistency across related contracts.
File Path | Change Summary |
---|---|
src/lib/verifier/.../DAVerifier.sol |
Modified parameter in verifyMultiRowRootsToDataRootTupleRoot function. |
src/lib/verifier/test/.../DAVerifier.t.sol |
Removed fixture.dataRoot() argument from function calls. |
src/lib/verifier/test/.../RollupInclusionProofs.t.sol |
Updated call to DAVerifier.verifySharesToDataRootTupleRoot . |
🌟🐇 A CodeRabbit's Ode to Code 🐇🌟
In the warren of wires and code, A small change does brightly glow. From
bytes32
roots we've boldly strode, To structured paths where data flows. Hop, skip, a leap in logic's abode, Crafted neatly in the coder's trove.
Thanks for reporting this 🙏
Can you provide test cases that fail without this fix?
I don't have a test case, I found this problem when code review.
The main take-away is that the extra _root
parameter is unnecessary and should use the one inside AttestationProof.tuple
@zhiqiangxu I confirm the bug, would you be able to add the tests? Also, this fix should also be done for: verifySharesToDataRootTupleRoot
and verifyRowRootToDataRootTupleRoot
. Would you be down to updating this PR to include fix + tests for those too?
If not, I'll gladly pick this PR up and add the necessary changes :D
@zhiqiangxu I confirm the bug, would you be able to add the tests? Also, this fix should also be done for:
verifySharesToDataRootTupleRoot
andverifyRowRootToDataRootTupleRoot
. Would you be down to updating this PR to include fix + tests for those too?If not, I'll gladly pick this PR up and add the necessary changes :D
I fixed the mentioned functions, please take a look, and feel free to add more tests if necessary:)
The original
_root
parameter is not verified before being used inverifyMultiRowRootsToDataRootTupleRootProof
, it will allow arbitrary_rowRoots
to be proved valid.Summary by CodeRabbit