Skip to content
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

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

Closed
soltanoff opened this issue Mar 6, 2023 · 18 comments
Closed

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

soltanoff opened this issue Mar 6, 2023 · 18 comments
Labels
Stale type: bug Something is not working

Comments

@soltanoff
Copy link

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

System info:

  • OS Name: Ubuntu
  • OS Version: 20.04
  • Node version (output of cardano-node --version)
    cardano-node --version
    cardano-node 1.35.5 - linux-x86_64 - ghc-8.10
    git rev 8762a10efe3f9f97939e3cb05edaf04250456702
  • CLI version (output of cardano-cli --version)
    cardano-cli --version
    cardano-cli 1.35.5 - linux-x86_64 - ghc-8.10
    git rev 8762a10efe3f9f97939e3cb05edaf04250456702
@soltanoff soltanoff added the type: bug Something is not working label Mar 6, 2023
@soltanoff soltanoff changed the title [QUESTION] calculate-min-fee for Unwitnessed Tx BabbageEra [BUG] calculate-min-fee for Unwitnessed Tx BabbageEra Mar 6, 2023
@Kriator7
Copy link

Kriator7 commented Mar 7, 2023 via email

@soltanoff
Copy link
Author

You can use the Cardano CLI command transaction calculate-min-fee to calculate the minimum fee for a transaction.

Yes, I use the command but there are problems on the mainnet as described above.

To change the type of transaction body, you may need to use a different command or version of the Cardano CLI. It's possible that the Unwitnessed Tx BabbageEra type of transaction body is not supported on the mainnet yet, or that there is a bug in the current version of the CLI.

If there were no difficulties in finding information, then I would not ask about it. Unfortunately, I haven't found a solution to my problem yet.

It would be great to see an example of creating a transaction body with other available types.

@soltanoff
Copy link
Author

@CarlosLopezDeLara, @Jimbo4350
Hi!
Can you help me with these mistakes from the description?

@soltanoff
Copy link
Author

@andrejpodzimek, hi!
Did you solve the same problem?

@soltanoff
Copy link
Author

The testnet expected one of:

  • Witnessed Tx ByronEra,
  • Witnessed Tx ShelleyEra,
  • Witnessed Tx AllegraEra,
  • Witnessed Tx MaryEra,
  • Witnessed Tx AlonzoEra,
  • Witnessed Tx BabbageEra,
  • Unwitnessed Tx ByronEra,
  • Unwitnessed Tx ShelleyEra,
  • Unwitnessed Tx AllegraEra,
  • Unwitnessed Tx MaryEra,
  • Unwitnessed Tx AlonzoEra,
  • Unwitnessed Tx BabbageEra

But the mainnet only:

  • TxUnsignedByron,
  • TxUnsignedShelley,
  • TxBodyAllegra,
  • TxBodyMary,
  • TxBodyAlonzo,
  • TxBodyBabbage

@soltanoff
Copy link
Author

@Jimbo4350, @CarlosLopezDeLara

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.

@Kriator7
Copy link

Kriator7 commented Mar 9, 2023 via email

@github-actions
Copy link

github-actions bot commented Apr 9, 2023

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.

@github-actions github-actions bot added the Stale label Apr 9, 2023
@soltanoff
Copy link
Author

Up

@github-actions github-actions bot removed the Stale label Apr 10, 2023
@CarlosLopezDeLara
Copy link
Contributor

@Jimbo4350, @CarlosLopezDeLara

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.

I'll take a look.

@soltanoff
Copy link
Author

@CarlosLopezDeLara, thanks!

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label May 11, 2023
@andrejpodzimek
Copy link

@andrejpodzimek, hi! Did you solve the same problem?

No, I did not. I’m looking into ways to retire my pool now, which is sort of hard without the ability to make transactions.

@soltanoff
Copy link
Author

In any case, as long as an Ubuntu-like image exists, I recommend using it before patching.

@soltanoff
Copy link
Author

Hi, this bug is still present in non-Ubuntu images. :)

I'll keep everyone updated.

@carbolymer
Copy link
Contributor

@soltanoff thanks for the bump. We've moved cardano-cli out of cardano-node repo to: https://github.com/IntersectMBO/cardano-cli
May I ask you to open a new issue there? It will be easier to track it there.

@soltanoff
Copy link
Author

@carbolymer, hi! Sure, thank you!

@soltanoff
Copy link
Author

Moved to IntersectMBO/cardano-cli#939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale type: bug Something is not working
Projects
None yet
Development

No branches or pull requests

6 participants
@carbolymer @andrejpodzimek @soltanoff @Kriator7 @CarlosLopezDeLara and others