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

[TRACKING ISSUE] aztec_noir: Attributes follow up work #1891

Closed
Maddiaa0 opened this issue Aug 30, 2023 · 1 comment
Closed

[TRACKING ISSUE] aztec_noir: Attributes follow up work #1891

Maddiaa0 opened this issue Aug 30, 2023 · 1 comment
Labels
C-aztec.nr Component: Aztec smart contract framework T-tracking Type: Tracking Issue. This contains tasklists.

Comments

@Maddiaa0
Copy link
Member

Maddiaa0 commented Aug 30, 2023

Overview

Now that the initial work has been merged into our and noir's master branch (behind the aztec feature flag on the frontend). The job is refining and getting this work stable for the long term.

The goal of this issue is to coordinate the tasks planned, for reference, see a related tracking issue in Noir. Note; while the scope of these tracking issue collides. They are distinct; as Noir's deals with longer term solutions.

Relevant Literature

Along with the linked tracking issue above, there are the following resources:

Relevant Prs

Aztec

Noir

Future Work

Unsupported input params

Currently unable to have bool params.
Linked issue:

Return Values

Right now the application user cannot return from the function without calling:

context.return_values.push(<value>); 

This further leaks the internals of the kernel to the developer. We should aspire such that the user should return from functions using n
normal noir semantics.
Linked Issue:

Removing the Open Keyword

Right now all open functions have a return value keyword at the beginning. This is then included in the abi and included in the contract's function tree. And also determines that brillig should be generated for the function. The use of the open keyword was chosen as public is considered overloaded. Consensus has such changed; the public keyword is now deemed suitable for this.
Linked Issue:

Removing the internal Keyword

Right now all internal functions have a return value keyword at the beginning. This is then included in the abi and included in the contract's function tree.
Linked Issue:

Auto import required resources from the aztec library

Currently; compilation will fail if the user has not included imports to the structures required. The following imports are required:

use aztec::abi;
use aztec::abi::{
         Hasher,
         PrivateContextInputs,
         PublicContextInputs
};
use aztec::context::{
     PublicContext,
     PrivateContext
};

Compilation fails without this, and should be hidden
Linked issue:

Output Suitable Error message if using aztec noir features without the library installed.

Related to above, the ast information that is injected includes tokens that are only available if aztec noir is available. It is a footgun that installation will fail with syntax issues if the user has not included an import to the relevant files.
Linked Issue:

Handling Storage

Despite the existence of our macro syntax. The user still needs to call let storage = Storage::init(). at the beginning of each function call.
Defining storage should be standardised such that when it is defined at the top of the file the developer does not need to worry about it too much.
Linked Issue:

Sub issue
Storage semantics have evolved over time, abstract away their definition from the developer.
#2163

Bugs

@LHerskind
Copy link
Contributor

This seems to be solve as to what we can do until more macros or accounted for in #5077 so I'm closing this one for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-aztec.nr Component: Aztec smart contract framework T-tracking Type: Tracking Issue. This contains tasklists.
Projects
Archived in project
Development

No branches or pull requests

2 participants