Skip to content

Creating an invalid tx when trying to mint too large amount of tokens #336

Closed
@nielstron

Description

@nielstron

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

ogmios.errors.ResponseError: Ogmios responded with error: {'jsonrpc': '2.0', 'method': 'evaluateTransaction', 'error': {'code': -32602, 'message': "Invalid transaction; It looks like the given transaction wasn't well-formed. Note that I try to decode the transaction in every possible era and it was malformed in ALL eras. Yet, I can't pinpoint the exact issue for I do not know in which era / format you intended the transaction to be. The 'data' field, therefore, contains errors for each era.", 'data': {'babbage': "invalid or incomplete value of type 'Transaction': expected word", 'conway': "invalid or incomplete value of type 'Transaction': expected word", 'alonzo': "invalid or incomplete value of type 'Transaction': expected list len or indef", 'mary': "invalid or incomplete value of type 'Transaction': Size mismatch when decoding Object / Array. Expected 4, but found 3.", 'allegra': "invalid or incomplete value of type 'Transaction': Size mismatch when decoding Object / Array. Expected 4, but found 3.", 'shelley': "invalid or incomplete value of type 'Transaction': Size mismatch when decoding Object / Array. Expected 4, but found 3."}}, 'id': None}

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):

  • OS: Ubuntu 22
  • PyCardano Version: 0.10.0

Additional context
Looping in @KtorZ for ogmios, but the error is really with PyCardano here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions