-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Add Differential Tests for Functions in _merkle.rs_ #502
Comments
Hi @0xNeshi, I’d love to work on this issue. I’ve previously implemented Merkle Trees in Rust and shared my work in this repository. Please assign this issue to me. Thank you! |
Differential Testing Implementation Plan for Merkle VerificationProposed Approach 🔍
I hope the approach is correct. Please suggest any changes or improvements to my approach. One question I have is: Should I do differential fuzzing or are differential unit tests sufficient? Thank you! |
Hi @Haxry , this seems like the right approach. Once you create the first differential test case, please create a draft PR so we can ensure we have the same understanding of the approach. Regarding your question, differential fuzz tests would be awesome to include! Note that diff. unit tests have higher priority. |
<!-- Thank you for your interest in contributing to OpenZeppelin! Consider opening an issue for discussion prior to submitting a PR. New features will be merged faster if they were first discussed and designed with the team. Describe the changes introduced in this pull request. Include any context necessary for understanding the PR's purpose. --> As [per our agreement](https://openzeppelin.slack.com/archives/C06R5AGFE9G/p1737021738986409), this PR includes a basic fuzz tests setup and some missing unit/property tests for `openzeppelin-crypto` crate. I created a couple of related issues to address missing property tests (see #501 #502 #503). Adding property tests for contract will be easily possible after `motsu` is refactored (see https://github.com/OpenZeppelin/stylus-test-helpers/pull/14/files#r1919897820) <!-- Fill in with issue number --> Resolves #458 #### PR Checklist <!-- Before merging the pull request all of the following must be completed. Feel free to submit a PR or Draft PR even if some items are pending. Some of the items may not apply. --> - [x] Tests - [x] Documentation - [ ] Changelog --------- Co-authored-by: Daniel Bigos <[email protected]> Co-authored-by: Alisander Qoshqosh <[email protected]>
What is the feature you would like to see?
Towards #520
See how Solidity's Foundry defines differential testing.
Differential tests would compare the results of our merkle verification implementation against some third-party implementation. This would help pinpoint any latent issues, bugs etc.
One possible candidate for this is rs-merkle, but we can search for other implementations if they're more robust/well-known
Contribution Guidelines
The text was updated successfully, but these errors were encountered: