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

Throw compile time error if contract has more than 16 functions #3500

Closed
spalladino opened this issue Dec 1, 2023 · 1 comment · Fixed by #3536
Closed

Throw compile time error if contract has more than 16 functions #3500

spalladino opened this issue Dec 1, 2023 · 1 comment · Fixed by #3536
Assignees
Labels
aztec.nr Aztec smart contract library bug Something isn't working

Comments

@spalladino
Copy link
Collaborator

spalladino commented Dec 1, 2023

Compiling a contract with more than 16 functions works, but trying to deploy it fails with Invalid array length. We should catch this error at compile-time if possible, and if not, at least provide a proper error message.

We can also increase the number of functions per contract (and we should), but should still provide a proper error message when it's exceeded.

@spalladino spalladino added bug Something isn't working aztec.nr Aztec smart contract library labels Dec 1, 2023
@rahul-kothari rahul-kothari changed the title "Invalid array length" when deploying a contract with more than 16 functions Throw compile time error if contract has more than 16 functions Dec 4, 2023
@rahul-kothari
Copy link
Contributor

rahul-kothari commented Dec 4, 2023

Hey! I have edited the title.

Re generic error length, this was introduced when we rewrote circuits in noir and there is a blocker on noir that prevents anything other than literal strings :(

While they are fixing this, I can look at how to create a compile time error for this!

@rahul-kothari rahul-kothari self-assigned this Dec 4, 2023
rahul-kothari added a commit that referenced this issue Dec 4, 2023
fix #3500 

Contracts can be compiled using nargo and nargo-wasm. So either we place
compile time checks in aztec-nr or in `noir-compiler`. I have done it in
later - specifically when we generate contract artifacts since that is
the earliest function used by both noir-wasm + compiler.

Let me know if there is a better place to add the check 🤷
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aztec.nr Aztec smart contract library bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants