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

increase HTTP server's default maximum POST size to 2MB #160

Merged
merged 2 commits into from Apr 30, 2022

Conversation

spoonincode
Copy link
Member

I'd say at least once a month I see a user ensnared by the HTTP server's default maximum POST size when trying to set a "large" (512KB-1MB) contract on their account. There's even a recent open issue in b1's repo with someone who fell victim to this trap (EOSIO/eos#11085)

The reason this problem creeps up is because the WASM in the request sent to the HTTP server in keosd is encoded as a hex byte array, effectively doubling its size in the POST payload.

#153 improves the error message in this situation. But I really can't see any downside to just increasing the default limit to 2MB. This allows users to set contracts up to just under 1MB in size -- the maximum size cleos can set contract code to as-is anyways. A 2MB instead of 1MB limit would even seem unlikely to impact a nodeos RPC node exposed publicly with no proxy protection in front of it.

@spoonincode
Copy link
Member Author

something bad with that test on main from which this was branched. fix is over in #144's ba933de so once that PR goes in I'll merge in the fix here

Copy link

@poplexity poplexity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does keosd also use the http plugin? Only thing worse than understanding the unclear error message is finally figuring it out and updating the setting on nodeos just to keep getting the same error message after updating nodeos because keosd is still failing.

@heifner
Copy link
Member

heifner commented Apr 29, 2022

Does keosd also use the http plugin? Only thing worse than understanding the unclear error message is finally figuring it out and updating the setting on nodeos just to keep getting the same error message after updating nodeos because keosd is still failing.

Yes, keosd uses the same http plugin.

@spoonincode spoonincode merged commit 44fdda5 into main Apr 30, 2022
@spoonincode spoonincode deleted the http_default_max_size_2mb branch April 30, 2022 19:29
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 this pull request may close these issues.

None yet

3 participants