-
Notifications
You must be signed in to change notification settings - Fork 721
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
Comments
It sounds like you're working with the Cardano blockchain, and specifically, trying to calculate the commission for a transaction with an Unwitnessed Tx BabbageEra type of transaction body.To calculate the commission for a transaction, you need to know the size of the transaction in bytes, as well as the current fee per byte on the network. The formula for calculating the minimum fee is:minimum fee = fee per byte * transaction sizeYou can use the Cardano CLI command transaction calculate-min-fee to calculate the minimum fee for a transaction. For example:cardano-cli transaction calculate-min-fee \--tx-body-file tx.raw \--tx-in-count 1 \--tx-out-count 1 \--mainnet \--witness-count 0 \--protocol-params-file protocol.json--protocol-params-file protocol.jsonThis command will calculate the minimum fee for a transaction with one input and one output, and no witnesses, using the protocol parameters specified in the protocol.json file.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. You may want to check the Cardano documentation or forums to see if there are any known issues or workarounds.As for why you only have certain types of transaction bodies on the mainnet, it could be due to the current state of the Cardano network and the development of new features. Different eras and features may be rolled out gradually, and may not be available on all nodes or wallets at the same time. This is why it's important to keep up to date with the latest releases and changes in the Cardano ecosystem.I hope this helps. CheersJames RupeCEO CardanoMint.comSPO Maximum Mint (Ticker AMINT)Co-CarPool Blockchain EducationOn Mar 6, 2023, at 11:52 AM, Ilya ***@***.***> wrote:
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 8762a10
CLI version (output of cardano-cli --version)
cardano-cli --version
cardano-cli 1.35.5 - linux-x86_64 - ghc-8.10
git rev 8762a10
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Yes, I use the command but there are problems on the mainnet as described above.
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. |
@CarlosLopezDeLara, @Jimbo4350 |
@andrejpodzimek, hi! |
The testnet expected one of:
But the mainnet only:
|
@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. |
Oh great find! I hope things work now. Cheers!James RupeStake Pool OperatorMaximum Mint (Ticker AMINT)CardanoMint.comOn Mar 9, 2023, at 5:52 AM, Ilia ***@***.***> wrote:
@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.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
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. |
Up |
I'll take a look. |
@CarlosLopezDeLara, thanks! |
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. |
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. |
In any case, as long as an Ubuntu-like image exists, I recommend using it before patching. |
Hi, this bug is still present in non-Ubuntu images. :) I'll keep everyone updated. |
@soltanoff thanks for the bump. We've moved |
@carbolymer, hi! Sure, thank you! |
Moved to IntersectMBO/cardano-cli#939 |
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:
How I do it on the testnet:
System info:
cardano-node --version
)cardano-cli --version
)The text was updated successfully, but these errors were encountered: