Error when submiting signed tx

Hello,

Firstly, is this guide okay to follow for 1.25.1? I have followed the guide up with success up to step 11 - Guide: How to build a Cardano Stake Pool - CoinCashew

until I had to send the signed transaction (last step) which gives as error:

cardano-cli transaction submit --tx-file tx.signed --mainnet

Shelley command failed: transaction submit Error: Error while submitting tx: ApplyTxError [LedgerFailure (UtxowFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash "b7d03a7026ed76fe78664aaf0c1300dc3b723b0e060a334fe786d233"]))))]

I am bit confused because when i query the payment address I am using

cardano-cli query utxo --address $(cat payment.addr) --allegra-era --mainnet

instead of

cardano-cli query utxo --address $(cat payment.addr) --mainnet

As the last one gives: A query from a certain era was applied to a ledger from a different era: EraMismatch {ledgerEraName = “Allegra”, otherEraName = “Shelley”}

Have I mixed up the eras and send to payment address in Allegra or I am just confused? Please give me some pointers.

  • The node is fully in sync

thank you.

probably the signing step is faulty - could you please provide that step as well?

thank you. Ive read the thread and added the cold.skey signed. What I used to sign below:
cardano-cli transaction sign
–tx-body-file tx.raw
–signing-key-file payment.skey
–signing-key-file stake.skey
–signing-key-file cold.skey
–mainnet
–out-file tx.signed

so - is it working now?

No the same error…sorry I was not clear.

I have tried this:
cardano-cli transaction sign
–tx-body-file tx.raw
–signing-key-file payment.skey
–signing-key-file stake.skey
–signing-key-file cold.skey
–mainnet
–out-file tx.signed

and this:

cardano-cli transaction sign
–tx-body-file tx.raw
–signing-key-file payment.skey
–signing-key-file stake.skey
–mainnet
–out-file tx.signed

multiple times. I have repeated the steps from creating the tx.raw and re signing again.

ok, and what is the actual transaction? can you please provide how tx.raw created?

yes of course.

cardano-cli transaction build-raw \
    --tx-in xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#1 \
    --tx-out $(cat payment.addr)+0 \
    --invalid-hereafter $(( 21904688 + 10000)) \
    --fee 0 \
    --out-file tx.tmp \
    --allegra-era \
    --certificate stake.cert


cardano-cli transaction build-raw \
    --tx-in xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#1 \
    --tx-out $(cat payment.addr)+97821299 \
    --invalid-hereafter $(( 21904688 + 10000)) \
    --fee 178701 \
    --certificate-file stake.cert \
    --allegra-era \
    --out-file tx.raw

Is it okay? what did I do wrong ? :slight_smile:

ok so cold key not needed since this is just a stake address registration… seems ok what you did…

your are quite at the beginning of the registration… how did you generate the addresses?

I have followed the instruction here: Guide: How to build a Cardano Stake Pool - CoinCashew

step by step. I can copy the commands here if needed. for the address I used this command:

cardano-cli address build \
    --payment-verification-key-file payment.vkey \
    --stake-verification-key-file stake.vkey \
    --out-file payment.addr \
    --mainnet

I can query and see my balance correctly like this:

cardano-cli query utxo \
    --address $(cat payment.addr) \
    --allegra-era \
    --mainnet

the only step is missing now is the cert file creation - are you sure that it is generated from stake.vkey?

I used this, yes the stake.vkey was already there from a previous command.

cardano-cli stake-address build \
    --stake-verification-key-file stake.vkey \
    --out-file stake.addr \
    --mainnet

cardano-cli stake-address registration-certificate \
    --stake-verification-key-file stake.vkey \
    --out-file stake.cert

I can start all over, no problem, but I have 100ADA in that address and I dont know how to move them now :slight_smile:

make a simple transaction back to your wallet address
https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/simple_transaction.html
with that at least you can verify that payment skey is ok.
I also recommend to create your keys from words instead of just generating it. with that you will able to recover the private keys…
unofficial: (i used this one)

or official:

okay I will check thoroughly the two links provided.
For the simple tx, following the docs.cardano the command to start is:

cardano-cli query protocol-parameters
–mainnet
–out-file protocol.json

this does not work, I get:

Shelley command failed: query protocol-parameters Error: A query from a certain era was applied to a ledger from a different era: EraMismatch {ledgerEraName = “Allegra”, otherEraName = “Shelley”}

I need to put

cardano-cli query protocol-parameters \
    --mainnet \
    --allegra-era \
    --out-file protocol.json

the same with

cardano-cli query utxo \
  --address $(cat payment.addr) \
  --mainnet

same error, it needs the allegra-era to pass.
Is that okay?

yes - go with --allegra-era (docs often out of date…)

So I am trying to send the simple transaction, which is not so simple :slightly_smiling_face:

I did the following:

cardano-cli transaction build-raw \
--tx-in xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#1 \
--tx-out $(cat payment_to.addr)+0 \
--tx-out $(cat payment.addr)+0 \
--invalid-hereafter 0 \
--fee 0 \
--out-file tx.draft

cardano-cli transaction build-raw \
--tx-in xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx#1 \
--tx-out $(cat payment_to.addr)+50000000 \
--tx-out $(cat payment.addr)+49823587 \
--invalid-hereafter 21932010 \
--fee 176413 \
--out-file tx.raw

cardano-cli transaction sign \
--tx-body-file tx.raw \
--signing-key-file payment.skey \
--mainnet \
--out-file tx.signed

and

cardano-cli transaction submit --tx-file tx.signed --mainnet

The error about the missing MissingVKeyWitnessesUTXOW, which I do not understand.

Shelley command failed: transaction submit Error: Error while submitting tx: ApplyTxError [LedgerFailure (UtxowFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash “b7d03a7026ed76fe78664aaf0c1300dc3b723b0e060a334fe786d233”]))))]
xxx@xxx:/mnt/sda1/cardano/keys$ cardano-cli transaction submit --tx-file tx.signed --mainnet

the payment address:
ardano-cli query utxo --address $(cat payment.addr) --allegra-era --mainnet
TxHash TxIx Amount
--------------------------------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1 100000000 lovelace

  • Basically it is the same error as initially when I was trying to register the stake address.

can you try to create again payment.addr from the already generated keys? and compare the new payment.addr with old one - should match

The addresses are the same, I have the good keys :slight_smile:

The address was created like this:

cardano-cli address build \
    --payment-verification-key-file payment.vkey \
    --stake-verification-key-file stake.vkey \
    --out-file payment.addr \
    --mainnet

So i have tried to sign with both the payment.skey and the stake.skey as well buy the same error. (basically like the coin-cashew guide)…

I am out of ideas, at least I would like to get back the 100 ADAs.

will try to make a transaction to check whether it works for me - I have not made one since the recent fork…

Your hint for the addresses helped to figure it out. I was signing with wrong keys…I have managed to send a simple tx :slight_smile: I restart the process and this time I will go with the mnemonic, as you said.
Thank you very much for your time!

Hi! good to hear that!:wink:
(please mark one of the answer as the solution)

1 Like