-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Comments
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. |
@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? |
@vicsn Yes, I can look into this-- by closures you mean explictly when something is called using I dont have this info on hand and it may take a day or two to get, if that's alright |
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
The text was updated successfully, but these errors were encountered: