Skip to content

Commit

Permalink
chore: add no predicate to poseidon2 (#5252)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves #4688 

## Summary\*
Adding the no_predicates attribute to poseidon2 because hashing
operations have no side-effect.


## Additional Context



## Documentation\*

Check one:
- [X] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [X] I have tested the changes locally.
- [X] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
guipublic authored Jun 14, 2024
1 parent 1849389 commit c6b42ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion noir_stdlib/src/hash/poseidon2.nr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct Poseidon2 {
}

impl Poseidon2 {

#[no_predicates]
pub fn hash<N>(input: [Field; N], message_size: u32) -> Field {
if message_size == N {
Poseidon2::hash_internal(input, N, false)
Expand Down

0 comments on commit c6b42ed

Please sign in to comment.