-
-
Notifications
You must be signed in to change notification settings - Fork 76
Creating an invalid tx when trying to mint too large amount of tokens #336
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
Comments
Indeed, the |
Note that: this is as good as it gets when it comes to deserialization errors here. I cannot get anything better without re-writing the CBOR parsers which I am slightly reluctant to at the moment 😅 ... |
So it should be possible to just check that mint is smaller than |
From the ledger spec, it looks like mint field should be int64, and |
If the spec sais i64 I agree we should restrict to that, not sys.maxsize |
Describe the bug
Trying to mint too many tokens produces and invalid transaction (basically minting 1231234145232534000000 here for example)
This results in ogmios failing to evaluate/submit the transaction with a very obscure error message.
To Reproduce
TBD
Logs
Expected behavior
Ogmios could report that the integer is breaking/incorrectly serialized. PyCardano should abort the building or raise an error/warning this.
Environment and software version (please complete the following information):
Additional context
Looping in @KtorZ for ogmios, but the error is really with PyCardano here.
The text was updated successfully, but these errors were encountered: