Skip to content

Commit

Permalink
fix: always inline derive_generators (#6350)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

If I turn down the inliner aggressiveness I start getting failures here
due to the need for `domain_generator_bytes` to be a constant. This PR
adds an attribute to always inline this function.

## 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
TomAFrench authored Oct 25, 2024
1 parent 8bc8e65 commit 7c98b36
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions noir_stdlib/src/hash/mod.nr
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ pub fn pedersen_hash_with_separator<let N: u32>(input: [Field; N], separator: u3
}

#[field(bn254)]
#[inline_always]
pub fn derive_generators<let N: u32, let M: u32>(
domain_separator_bytes: [u8; M],
starting_index: u32,
Expand Down

0 comments on commit 7c98b36

Please sign in to comment.