Skip to content
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

Generate generators in comptime #8648

Closed
nventuro opened this issue Sep 19, 2024 · 2 comments · Fixed by #9195
Closed

Generate generators in comptime #8648

nventuro opened this issue Sep 19, 2024 · 2 comments · Fixed by #9195
Assignees

Comments

@nventuro
Copy link
Contributor

As mentioned here, aztec-nr/src/generators.nr has a bunch of hard-coded generators. These should be generated at comptime instead.

@jp4g
Copy link

jp4g commented Oct 10, 2024

This is causing some issues for people who want to use notes - if you want a note with > 4 (using #[note]) or 5 (using #[note_custom_interface]) you need to use std::hash::derive_generators at runtime or manually log out the generators then set them as constants yourself (i didn't see a js api for this but tbh didn't look too hard).

A: requires the dev to hunt down where the #[note] isn't working
B: requires the dev to do all the boilerplate for custom note interface that is really just being done for the sole point of changing fn compute_note_hash(self)

By no means breaking with the but it introduces a ton of friction in an otherwise reasonably easy process

@nventuro
Copy link
Contributor Author

@jp4g yes, we also need to extend this so that it's not so few of them. Thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants