IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
44 stars 15 forks source link

[BUG] calculate-min-fee for Unwitnessed Tx BabbageEra #939

Open soltanoff opened 1 month ago

soltanoff commented 1 month ago

Internal/External External .

Area cardano-cli

Summary Do you know what I need to do to calculate the commission for Unwitnessed Tx BabbageEra type of transaction body?

Or what should I do to change the type of transaction body?

Why do I only have these types on the mainnet? (TxUnsignedByron, TxUnsignedShelley, TxBodyAllegra, TxBodyMary, TxBodyAlonzo, TxBodyBabbage)

In general, a strange situation, because in the testnet this type of transaction body works and I can calculate the commission and sign it in the future.

On the mainnet, I have the following problem:

Command failed: transaction calculate-min-fee 
Error: Failed to decode neither the cli's serialisation format nor the ledger's CDDL serialisation format. 
       TextEnvelope error: /dev/stdin: 
       TextEnvelope type error: 
       Expected one of: TxUnsignedByron, TxUnsignedShelley, TxBodyAllegra, TxBodyMary, TxBodyAlonzo, TxBodyBabbage 
       Actual: Unwitnessed Tx BabbageEra
       TextEnvelopeCddl error: /dev/stdin: Could not JSON decode TextEnvelopeCddl file at: /dev/stdin Error: Error in $: not enough input

How I do it on the testnet:

cardano-cli transaction calculate-min-fee \
  --testnet-magic 1 \
  --protocol-params-file <(echo '<this is a protocol params>') \
  --tx-body-file /dev/stdin <<< '{"type": "Unwitnessed Tx BabbageEra", "description": "Ledger Cddl Format", "cborHex": "<hex>"}' \
  --tx-in-count 1 \
  --tx-out-count 2 \
  --witness-count 1
175269 Lovelace
soltanoff commented 1 month ago

The testnet expected one of:

But the mainnet only:

Through trial and error, it turned out that the problem was in the operating system of the cardano image. The pipes are broken on Debian-based, so we've moved to Ubuntu-based images on all environments.

BUT you have to investigate and fix it for Debian-based image.

soltanoff commented 1 month ago

This issue moved from https://github.com/IntersectMBO/cardano-node/issues/4945

soltanoff commented 2 weeks ago

up