-
Notifications
You must be signed in to change notification settings - Fork 381
Access/modify function runtime type in comptime #5954
Copy link
Copy link
Closed
Description
Problem
In aztec contracts, unconstrained functions are modified to inject context and abstract their storage. We do this without the need for an annotation.
Aztec #[public] functions are unconstrained, because it's the AVM's role to constrain them. We don't want the user to have to mark every single one of them as unconstrained (also it might give them the incorrect impression that they won't be constrained)
Happy Case
It's possible to both access:
comptime fn my_annotation(f: FunctionDefinition) {
let is_unconstrained = f.is_unconstrained();
}and modify
comptime fn my_annotation(f: FunctionDefinition) {
f.set_unconstrained(true);
}a function's runtime in a macro.
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels