-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Use poseidon Hasher api #9888
Conversation
Changes to public function bytecode sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
@@ -264,65 +266,50 @@ pub fn poseidon2_hash_with_separator<let N: u32, T>(inputs: [Field; N], separato | |||
where | |||
T: ToField, | |||
{ | |||
// We manually hash the inputs here, since we cannot express with the type system a constant size inputs array of N + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the only reason you did this was because we didn't support arithmetic generics at the time you wrote these functions. You should be able to just do Poseidon2::hash([separator, ...inputs], N+1)
(no spread syntax though).
Alternative approach to noir-lang/noir#6491 - instead of using the internals we use the new API. It seems like recent developments in the language re. generics and slices now let us do it.