Open ilap opened 2 months ago
Would you mind attaching a failing transaction to the issue?
Would you mind attaching a failing transaction to the issue?
Here comes, but any tx with a redeemer contains a constructor (e.g. 121([])
) would do:
tx_with_redeemer.json
Cardano-cli just outputs null in the case of a redeemer containing a constructor (e.g. 121([]) ). But we can verify that it indeed has a redeemer from manually decoding transaction cbor using https://cbor.me. The transaction decoding part should be looked into to facilitate tag-based plutus types.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
Description
When attempting to render the redeemer of a transaction using cardano-cli with the command:
cardano-cli debug transaction view --output-json --tx-file ample.tx
The CLI shows the following error message:
Error decoding redeemer: unexpected CBOR token type for a JSON value: TypeTag
Expected result: The redeemer should be rendered as part of the transaction data in JSON format.
Steps to Reproduce
cardano-cli debug transaction view --output-json --tx-file <path-to-tx-file>
Error decoding redeemer: unexpected CBOR token type for a JSON value: TypeTag
.Additional Context
The error appears to occur while decoding the CBOR representation of the redeemer, where the redeemer's Plutus data contains tags. The decoding works correctly for redeemers using the Bigint Plutus type, such as
[ 0, 0, 0, [123, 234]]
.However, it fails when the redeemer contains tag-based Plutus types, such as
[0, 0, 121([]), [123, 234]]
.Cardano CLI version: 9.x.y.z (probably earlier are affected too). Operating System: Ubuntu 22.04]
Possible Solution
A potential solution could involve reviewing the CBOR decoding logic to properly handle tags within redeemer data types.