From 7c98b36305ffdbbaee3947723f248fa718e7a950 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:09:02 +0100 Subject: [PATCH] fix: always inline `derive_generators` (#6350) # Description ## Problem\* Resolves ## 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. --- noir_stdlib/src/hash/mod.nr | 1 + 1 file changed, 1 insertion(+) diff --git a/noir_stdlib/src/hash/mod.nr b/noir_stdlib/src/hash/mod.nr index 15112757312..c5e6da9d76f 100644 --- a/noir_stdlib/src/hash/mod.nr +++ b/noir_stdlib/src/hash/mod.nr @@ -75,6 +75,7 @@ pub fn pedersen_hash_with_separator(input: [Field; N], separator: u3 } #[field(bn254)] +#[inline_always] pub fn derive_generators( domain_separator_bytes: [u8; M], starting_index: u32,