-
Notifications
You must be signed in to change notification settings - Fork 220
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
feat(stdlib)!: Adding Mimc Sponge to stdlib #2297
Conversation
Hi, Thank you for your contribution! Can you update the description to accurately describe the changes being made in this PR, ie why files were moved, why we need the sponge variation etc? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently a breaking change. Can you please undo moving the existing mimc functions?
Perhaps its better to just change the PR title because it makes sense to move it to its own file |
@TomAFrench I changed the title to a breaking change as I do think moving the mimc functions to their own file makes sense. Especially when the impls require long lists of constants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seugu you need to update the import in a couple tests that you can see failing in the CI.
Could you also add a test for MiMCSponge that checks the output of some simple outputs. There are similar tests for hash functions like sha256 under crates/nargo_cli/tests/execution_success
which you can follow. The test will just be a simple Noir program.
Updating import for mimc_bn254
I can't really validate the correctness of the implementation so I'll approve if someone on the team vouches for it. That said, I think this goes against our aims in #1258. This would be best as a mimc library. |
I recommended for this to be put in the standard lib as MiMC is common hash function that should not be changing much and we already have MiMC7 inside of the stdlib. I forgot about the issue and aims listed in #1258, but perhaps this can just be moved out once we have some type of The implementation is correct from my review and checks against the circom implementations. |
@seugu It looks like you are using an old version of |
I'm closing this PR as the mimc implementation has been moved to an external library: https://github.com/noir-lang/mimc |
Description
Problem*
Resolves
Summary*
Documentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmt
on default settings.