Skip to content

Conversation

@AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Sep 5, 2025

BEGIN_COMMIT_OVERRIDE
chore: databus internal audit - small cleanups and tests coverage (#16703)
chore: stdlib::poseidon2 internal audit (#16534)
END_COMMIT_OVERRIDE

…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
AztecBot and others added 2 commits September 5, 2025 11:21
### 🧾`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
@fcarreiro fcarreiro removed their request for review September 5, 2025 11:47
Copy link
Collaborator

@ludamad ludamad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved

@AztecBot AztecBot added this pull request to the merge queue Sep 5, 2025
@AztecBot
Copy link
Collaborator Author

AztecBot commented Sep 5, 2025

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

Merged via the queue into next with commit f84ce60 Sep 5, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants