Conversation
…6703) a small PR doing the following as a part of the `databus` audit - added tests to check the handling of constant or unnormalized indexes - removed some ugliness with dangling witnesses and replaced them with `set_variable` - some minor cleanups
### 🧾`stdlib::poseidon2` internal audit - Most of the `Poseidon2`-related methods and classes were unnecessarily templated on a variety of parameters, such as `rate` and `capacity` of the permutation, while at the same time our Circuit Builders would only support the case `rate = 3`, `capacity = 1`. To avoid confusion and improve the readability, I minimized the number of templates. - The `sponge` class was only invoked with a sequence of `absorb` calls that would lead to a single `squezze` call. It allowed to simplify the class logic. - Simplified the `Poseidon2Permutation` class by re-using some of the `field_t` methods. Improved the docs. - Added a detailed **readme** that contains links to the sources, including the padding choices in `sponge` and the explanation of the custom Poseidon2 gates - Audited relations, expanded corresponding docs - Added a bunch of tests - collision-resistance sanity check, test against the hash outputs from https://github.com/zemse/poseidon2-evm, several basic failure tests
Collaborator
Author
|
🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BEGIN_COMMIT_OVERRIDE
chore: databus internal audit - small cleanups and tests coverage (#16703)
chore:
stdlib::poseidon2internal audit (#16534)END_COMMIT_OVERRIDE