Unable to move ADA after retiring the stake pool

Hello everyone,
I’m sorry to bother you all but I have a critical issue, I’m unable to send my ADA to my wallet on Yoroi. I have a pool, currently retired. I would like to send 500 ADA from the stake address + 1600 ADA from my pledge to Yoroi.

I follow all the instructions, each step works as expected, the lastone gives me back this error:

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (AlonzoInBabbageUtxowPredFailure (ShelleyInAlonzoUtxowPredFailure (MissingVKeyWitnessesUTXOW (fromList [KeyHash “f20babed091ca1ab71fb99aedd17e9c7f3dbdf5855e7f3f9ec0909a0”]))))])

I looked for other people having the same issue here and I read somewhere they had some problem with the keys. How can I undertand my issue?
Which keys should I check?

I’m panicking!!
Thanks for your time guys

Which guide/instructions are you following?

Hi Jeremy, thank you for your reply!
I followed those guides:

Can you please help me? :scream:

U are using the wrong files (for wallet) to sign the transaction

Hello Alex, really thank you for you reply.
I will have a look more and more about what you said. I will let you know, in the meanwhile thank you for your time!

Hello,
short update: I tried again and again, it does not work yet.
With relax, I will share each step with commands and output. I would like to share in the best way so you can help. In the meanwhile, really thank you for your time!

Hi,

You can check if the wallet payment.vkey file is the right for ur payment.addr file

The command should be

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

check if payment.addr is the same from payment1.addr

Cheers,

Hello and thank you!
I ran the command as follow:

$ cardano-cli address build \

–payment-verification-key-file ./cardano-my-node/offline/cold-keys/payment/payment.vkey
–stake-verification-key-file ./cardano-my-node/offline/cold-keys/stake/stake.vkey
–out-file payout.addr \
–mainnet

$cat payout.addr
addr1q8vdm5a52zzedcqp9744a4vpp746jsc54f7zmr5akqpkudxn62txh4z8z63n37s46edarvlhvlwtk2ax3hfqavv5w5aq8ewh64

The content is the same of the file I’m trying to use:

$ cat cardano-my-node/offline/cold-keys/payment/payment.addr
addr1q8vdm5a52zzedcqp9744a4vpp746jsc54f7zmr5akqpkudxn62txh4z8z63n37s46edarvlhvlwtk2ax3hfqavv5w5aq8ewh64

:thinking:

can u paste all transaction commands here?

Of course! Here we go.

Scenario:

cardano-cli query utxo --address $(cat /home/alessio/cardano-my-node/offline/cold-keys/payment/payment.addr) --mainnet
                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
2fe4ed7176a40be687d57ca1ced253231b0b712cc871e5a4baa295753e16ebe9     0        1960309531 lovelace + TxOutDatumNone
a28873de50c0edb6a24e294c27a7cb7f3e28d08fbc5432f218be52d5a7f768a1     0        1000000 lovelace + TxOutDatumNone

1) Get the current slot
Current Slot: 107271590

2) Set the amount to lovelace
amountToSend: 1960309531 ( it is my whole pledge showed above )

3) Set the destination address
destinationAddress: addr1q8zufyywk0p7uue2jnth23r65ahz3d9pzl74qhs672cmnelh3wg2kjswmapxdemq43rccp9jz4y97ydtutccy798382sp584ar ( pasted from Yoroi showed above )

4) Find your balance and UTXOs
( already showed above but I repeat it again, adding an echo of tx_in variable )

2fe4ed7176a40be687d57ca1ced253231b0b712cc871e5a4baa295753e16ebe9     0        1960309531 lovelace + TxOutDatumNone
a28873de50c0edb6a24e294c27a7cb7f3e28d08fbc5432f218be52d5a7f768a1     0        1000000 lovelace + TxOutDatumNone
TxHash: 2fe4ed7176a40be687d57ca1ced253231b0b712cc871e5a4baa295753e16ebe9#0
ADA: 1960309531
tx_in option means --tx-in 2fe4ed7176a40be687d57ca1ced253231b0b712cc871e5a4baa295753e16ebe9#0
TxHash: a28873de50c0edb6a24e294c27a7cb7f3e28d08fbc5432f218be52d5a7f768a1#0
ADA: 1000000
tx_in option means --tx-in 2fe4ed7176a40be687d57ca1ced253231b0b712cc871e5a4baa295753e16ebe9#0 --tx-in a28873de50c0edb6a24e294c27a7cb7f3e28d08fbc5432f218be52d5a7f768a1#0
Total available ADA balance: 1961309531
Number of UTXOs: 2

5) Run the build-raw transaction command.

cardano-cli transaction build-raw \
--tx-in 2fe4ed7176a40be687d57ca1ced253231b0b712cc871e5a4baa295753e16ebe9#0 \ <-- took from the previous output
--tx-out $(cat /home/alessio/cardano-my-node/offline/cold-keys/payment/payment.addr)+0 \
--tx-out addr1q8zufyywk0p7uue2jnth23r65ahz3d9pzl74qhs672cmnelh3wg2kjswmapxdemq43rccp9jz4y97ydtutccy798382sp584ar+0 \ <-- yoroi wallet
--invalid-hereafter $(( 107271590 + 10000)) \
--fee 0 \
--out-file tx.tmp

6) Calculate the current minimum fee:

fee=$(cardano-cli transaction calculate-min-fee \
--tx-body-file tx.tmp \
--tx-in-count 1 \
--tx-out-count 2 \
--mainnet \
--witness-count 1 \
--byron-witness-count 0 \
--protocol-params-file params.json | awk '{ print $1 }')
echo fee: $fee

it gives the output:
fee: 176765

7) Calculate your change output.
I wanna move all the ADA calculating the fee, so:

$ echo "1960309531-176765" | bc -l
1960132766

I wrote this then

txOut=$((1960309531-176765-1960132766))
echo Change Output: ${txOut}

it gives:
Change Output: 0

8) Build your transaction.

cardano-cli transaction build-raw \
--tx-in 2fe4ed7176a40be687d57ca1ced253231b0b712cc871e5a4baa295753e16ebe9#0 \
--tx-out $(cat /home/alessio/cardano-my-node/offline/cold-keys/payment/payment.addr)+0 \
--tx-out addr1q8zufyywk0p7uue2jnth23r65ahz3d9pzl74qhs672cmnelh3wg2kjswmapxdemq43rccp9jz4y97ydtutccy798382sp584ar+1960132766 \
--invalid-hereafter $(( 107271590 + 10000)) \
--fee 176765 \
--out-file tx.raw

9) Sign the transaction with the payment secret key.

cardano-cli transaction sign \
--tx-body-file tx.raw \
--signing-key-file /home/alessio/cardano-my-node/offline/cold-keys/payment/payment.skey \
--mainnet \
--out-file tx.signed

10) Send the signed transaction.

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

it gives:
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (BabbageOutputTooSmallUTxO [((Addr Mainnet (KeyHashObj (KeyHash "d8ddd3b4508596e0012fab5ed5810faba94314aa7c2d8e9db0036e34")) (StakeRefBase (KeyHashObj (KeyHash "d3d2966bd44716a338fa15d65bd1b3f767dcbb2ba68dd20eb194753a"))),MaryValue 0 (MultiAsset (fromList [])),NoDatum,SNothing),Coin 961130)]))])

If you see some stupid error feel free to insult me ahahah!
I just wanna move my ADA to Yoroi :sweat_smile:

Hello guys do you have any feedback? I’m checking the logs and repeating… I don’t know what I’m missing.

Please help me!!! :scream:

Do u have any other assets?

Unfortunetely no! :pensive:

Did you think about something?

@Alexd1985 sorry to bother again and again… do you think we could have a short call on gmail? Maybe I will be more secure about some step above

Again thank you!

Try a small transaction, for example only 100 ADA

Do you really have --tx-out $(cat /home/alessio/cardano-my-node/offline/cold-keys/payment/payment.addr)+0 in the final build command?
That’s an output of 0 ADA. That is not allowed and for sure results in a BabbageOutputTooSmallUTxO.

Hello yes I did! I took it from the guide.
I will try without adding +0, in the meanwhile thank you for your interest :smiling_face:

I will let you know

Ciao Alex, let me try :slight_smile:

Hello, I tried running the command without the “+0”:

cardano-cli transaction build-raw \
--tx-in 2fe4ed7176a40be687d57ca1ced253231b0b712cc871e5a4baa295753e16ebe9#0 \
--tx-out $(cat /home/alessio/cardano-my-node/offline/cold-keys/payment/payment.addr)\
--tx-out addr1q8zufyywk0p7uue2jnth23r65ahz3d9pzl74qhs672cmnelh3wg2kjswmapxdemq43rccp9jz4y97ydtutccy798382sp584ar+1960132766 \
--invalid-hereafter $(( 107271590 + 10000)) \
--fee 176765 \
--out-file tx.raw
option --tx-out:
unexpected "-"
expecting white space or quantity (word64)

the 0 comes from this:

txOut=$((1960309531-176765-1960132766))
echo Change Output: ${txOut}

it gives:
Change Output: 0

I ran the formula from the guide:

txOut=$((${total_balance}-${fee}-${amountToSend}))
echo Change Output: ${txOut}

Not without the +0, without the whole output!

You don’t want to send a change output back to that address if you want to send everything to another address.