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

Add limits on program struct definitions #3141

Closed
howardwu opened this issue Mar 2, 2024 · 3 comments · Fixed by AleoNet/snarkVM#2384
Closed

Add limits on program struct definitions #3141

howardwu opened this issue Mar 2, 2024 · 3 comments · Fixed by AleoNet/snarkVM#2384
Assignees

Comments

@howardwu
Copy link
Contributor

howardwu commented Mar 2, 2024

There was a dummy program written which sized up to 50MBs by leveraging the struct construction.

Following this discussion, the decision was made to reduce the number of structs that can be defined in a program, and to bound any other constructs of a program so that the size of a program is inherently restricted.

@vicsn and @d0cd will be responsible with implementing a PR to contain this.

Originally posted by @howardwu in https://github.com/AleoHQ/snarkOS/issues/3124#issuecomment-1974921008

@vicsn
Copy link
Contributor

vicsn commented Mar 3, 2024

I did not do a full analysis of all potential ways in which program sizes can be bloated - and suggest we just impose a limit on the total number of characters of the program so that we don't have to spend a week of engineering days analysing different attack vectors.

@vicsn
Copy link
Contributor

vicsn commented Mar 4, 2024

@miazn I recall some time ago you looked into programs being deployed on testnet3, would it be possible to get an estimate about the maximum number of structs and closures used, as well as the maximum number of characters? Or do you have a link to some of these biggest programs?

@miazn
Copy link
Contributor

miazn commented Mar 4, 2024

@vicsn Yes, I can look into this-- by closures you mean explictly when something is called using closure? https://developer.aleo.org/aleo/language/#closure

I dont have this info on hand and it may take a day or two to get, if that's alright

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.

5 participants