-
Notifications
You must be signed in to change notification settings - Fork 471
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
request body too large #6031
Comments
Are you asking that Without such a change, arbitrarily large programs (with huge comments) could crash algod with memory errors. |
I think there are two more reasonable solutions here
This could also be solved by high-level languages removing comments from emitted TEAL but as a developer comments in the TEAL are useful so just having a local algod with higher limit could be a nice QoL, but I think the SDK solution would be sufficient. |
I dont specificly need the comments to be sent to algod in this issue. I opened this issue so that other developers when reaching the max program size and they have some comments in code does not hit the same issue. It is prefered by dev perspective to hit the error "program too large" instead "post body size too large". So just please increse allowed post body size to something more reasonable. But on the other side, from time to time developers may be interested to write into blockchain also some metadata. For example in c# people have choice to build also symbols package and when decompiling the variable names as well as comments are included in the decompiled code. But i am not asking this feature in this specific issue, but it would be nice feature to have, for example for arc200 assets or arc72 nfts. |
The confusion here is probably that it is not immediately clear that there is no such server-wide "post body" limit size, as is most often the case when dealing with web apis. The algod code uses http.MaxBytesReader in various contexts with different values depending on the context, while in every case yielding the 'request body too big' type of error. So Scholtz is probably assuming that there is a server scoped post body limit that is too low, preventing the teal compile function from completing its job. In actual fact the teal compile function just checks for a 200k-ish hard coded limit using http.MaxBytesReader. |
just increase the The error is thrown probably here:
|
MaxTealSourceBytes to 1M algorand#6031
Subject of the issue
I hit error: "request body too large" when deploying contract
Note that in my case this error has occured after upgrading the tealscript version and algokit which added more comments to the generated client code.
Please increase post body size to the limit where any future build of the contract would rather fail on "teal code too big" instead of the input body is too big.
Also note that Joe fixed the same thing for compiling contract between version of 0.95.0 and 0.95.1 and just removed the comments. But i think the increase of allowed post body in the algod is better solution then to trim comments.
Your environment
Steps to reproduce
Expected behaviour
If contract is too large i expect to receive contract too large error message.
Actual behaviour
The text was updated successfully, but these errors were encountered: