-
Notifications
You must be signed in to change notification settings - Fork 39
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
Raise PayloadTooLarge
error instead of InputTooLarge
error in InputBox
#224
Comments
How would you calculate |
After this PR being merged, we add
Therefore, the
This is based on the encoding of What do you think? |
Your thought process is solid, but the code that calculates |
If someone changes |
Ideally, the constant should be updated automatically when the |
Having said that, I would keep things the way they are now. |
📚 Context
Going forward, inputs are blockchain-agnostic blobs containing metadata and the input payload itself. If the blob is larger than the limit set by Cartesi Virtual Machine, contract
InputBox
raises anInputTooLarge
error, with the input blob size and the limit, defined in the interfaceIInputBox
.However, this error can be confusing to the users as they may not know about the construction of the input blob under the hood, and it takes some figuring out and guess work to know how to adjust their
payload
argument to avoid the error.The direct way would be to prompt the
PayloadTooLarge
error with the payload size and limit.✔️ Solution
Replace
InputTooLarge
error withPayloadTooLarge
.May add a constant
INPUT_PAYLOAD_MAX_SIZE
in thecommon/CanonicalMachine
library.The text was updated successfully, but these errors were encountered: