Python-Cardano/pycardano

PyCardano creates invalid transaction for Chang networks

nielstron opened this issue · 5 comments

Describe the bug

pycardano.exception.TransactionFailedException: Failed to submit transaction. Error code: 400. Error message: {"contents":{"contents":{"contents":"EraMismatch {ledgerEraName = \"Conway\", otherEraName = \"Babbage\"}","tag":"TxValidationEraMismatch"},"tag":"TxCmdTxSubmitValidationError"},"tag":"TxSubmitFail"}

To Reproduce
Build and submit tx using Ogmios V6 and i.e. collect_gift.py from OpShin pioneer program on preprod

Expected behavior
Should submit correctly

Additional context
Copied from discord: https://discord.com/channels/1077870759667580929/1276796332178276377

Also apparently the old tx format is incompatible to new hardfork Chang era: https://x.com/_KtorZ_/status/1829102452630491140

TODO: find some documentation of what exactly breaks in Chang

It seems like @cffls already started building a branch for Chang here: https://github.com/Python-Cardano/pycardano/commits/chang/

Since the only reason that Chang is not mainnet yet was some delay it would be good if this progresses soon 😅 Trying to consolidate progress in this issue

cffls commented

Merged your branch feat/add_v6_backend into chang, but there seems to be some issue in python ogmios.

cffls commented

I suspect the problem you observed above was caused by the enforcement of non-empty set/list in the second era of Chang HF: https://github.com/IntersectMBO/cardano-ledger/blob/master/eras/conway/impl/cddl-files/extra.cddl#L1-L3

Hi, wanted to know if this issue is already fixed. I am having the same error right now. My app is stuck and cannot submit transactions.

Hey @larestrepo
please try using the chang branch of PyCardano and report issues in #371, that would be extremely helpful!