Get an error trying to send funds from node

amarbarace@adamain:~$ history | more
1 rm -rf $NODE_HOME/cardano-wallet-shelley-2020.7.28
2 cardano-cli stake-address registration-certificate --stake-verificati
on-key-file stake.vkey --out-file stake.cert
3 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-
file payment.skey --signing-key-file stake.skey --mainnet --out-file
tx.signed
4 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-
file payment.skey --signing-key-file stake.skey --mainnet --out-file
tx.signed
5 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-
file payment.skey --signing-key-file stake.skey --mainnet --out-file
tx.signed
6 ###
7 ### On air-gapped offline machine,
8 ###
9 cardano-cli stake-address key-gen --verification-key-file stake.vkey
–signing-key-file stake.skey
10 cat payment.addr
11 ###
12 ### On air-gapped offline machine,
13 ###
14 cardano-cli address build --payment-verification-key-file payment.vke
y --stake-verification-key-file stake.vkey --out-file payment.addr -
-mainnet
15 cat payment.addr
16 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file stake.skey --mainnet --ou
t-file tx.signed
17 cat payment.addr
18 cardano-cli query utxo --address $(cat payment.addr) --mainnet > fullUtxo.out
19 tail -n +3 fullUtxo.out | sort -k3 -nr > balance.out
20 cat balance.out
21 tx_in=""
22 total_balance=0
23 while read -r utxo; do
24 in_addr=$(awk ‘{ print $1 }’ <<< “${utxo}”)
25 idx=$(awk ‘{ print $2 }’ <<< “${utxo}”)
26 utxo_balance=$(awk ‘{ print $3 }’ <<< “${utxo}”); total_balance=$((${total_balance}+${utxo_balance})); echo TxHash: ${in_addr}#${idx}
27 echo ADA: ${utxo_balance}; tx_in="${tx_in} --tx-in ${in_addr}#${idx}"; done < balance.out
28 txcnt=$(cat balance.out | wc -l)
29 echo Total ADA balance: ${total_balance}
30 echo Number of UTXOs: ${txcnt}
31 cardano-cli stake-pool registration-certificate --cold-verification-key-file $HOME/cold-keys/node.vkey --vrf-verification-key-file vrf.vkey
–pool-pledge 100000000 --pool-cost 345000000 --pool-margin 0.15 --pool-reward-account-verification-key-file stake.vkey --pool-owner-
stake-verification-key-file stake.vkey --mainnet --single-host-pool-relay <dns based relay, example ~ relaynode1.myadapoolnamerocks.com> --poo
l-relay-port 6000 --metadata-url --metadata-hash $(cat poolMetaDataHash.txt) --out-file pool.cert
32 cardano-cli stake-pool registration-certificate --cold-verification-key-file $HOME/cold-keys/node.vkey --vrf-verification-key-file vrf.vkey
–pool-pledge 100000000 --pool-cost 345000000 --pool-margin 0.15 --pool-reward-account-verification-key-file stake.vkey --pool-owner-
stake-verification-key-file stake.vkey --mainnet --single-host-pool-relay 159.89.231.118 --pool-relay-port 6000 --metadata-url github.com/
amauricetech/Cardano-HAL/blob/main/poolMetaData.json --metadata-hash $(cat poolMetaDataHash.txt) --out-file pool.cert
33 cardano-cli stake-address delegation-certificate --stake-verification-key-file stake.vkey --cold-verification-key-file $HOME/cold-keys/node
.vkey --out-file deleg.cert
34 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file $HOME/cold-keys/node.skey --s
igning-key-file stake.skey --mainnet --out-file tx.signed
35 cardano-cli query utxo --address $(cat payment.addr) --mainnet
36 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file $HOME/cold-keys/node.skey --s
igning-key-file stake.skey --mainnet --out-file tx.signed
37 cd $NODE_HOME
38 cardano-cli node key-gen-KES --verification-key-file kes.vkey
39 mkdir $HOME/cold-keys
40 pushd $HOME/cold-keys
41 cardano-cli node issue-op-cert --kes-verification-key-file kes.vkey --cold-signing-key-file $HOME/cold-keys/node.skey --operational-cer
tificate-issue-counter $HOME/cold-keys/node.counter --kes-period --out-file node.cert
42 ###
43 ### On air-gapped offline machine,
44 ###
45 cd $NODE_HOME
46 cardano-cli address key-gen --verification-key-file payment.vkey --signing-key-file payment.skey
47 ###
48 ### On air-gapped offline machine,
49 ###
50 cardano-cli stake-address key-gen --verification-key-file stake.vkey --signing-key-file stake.skey
51 ###
52 ### On air-gapped offline machine,
53 ###
54 cardano-cli stake-address build --stake-verification-key-file stake.vkey --out-file stake.addr --mainnet
55 ###
56 ### On air-gapped offline machine,
57 ###
58 cardano-cli address build --payment-verification-key-file payment.vkey --stake-verification-key-file stake.vkey --out-file payment.addr
–mainnet
59 cat payment.addr
60 cardano-cli stake-address registration-certificate --stake-verification-key-file stake.vkey --out-file stake.cert
61 22cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file stake.skey --mainnet –
out-file tx.signed
62 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file stake.skey --mainnet --ou
t-file tx.signed
63 cardano-cli stake-pool registration-certificate --cold-verification-key-file $HOME/cold-keys/node.vkey --vrf-verification-key-file vrf.vkey
–pool-pledge 100000000 --pool-cost 345000000 --pool-margin 0.15 --pool-reward-account-verification-key-file stake.vkey --pool-owner-
stake-verification-key-file stake.vkey --mainnet --single-host-pool-relay 159.89.231.118 --pool-relay-port 6000 --metadata-url github.com/
amauricetech/Cardano-HAL/blob/main/poolMetaData.json --metadata-hash $(cat poolMetaDataHash.txt) --out-file pool.cert
64 cardano-cli stake-address delegation-certificate --stake-verification-key-file stake.vkey --cold-verification-key-file $HOME/cold-keys/node
.vkey --out-file deleg.cert
65 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file $HOME/cold-keys/node.skey --s
igning-key-file stake.skey --mainnet --out-file tx.signed
66 cardano-cli stake-address delegation-certificate --stake-verification-key-file stake.vkey --cold-verification-key-file $HOME/cold-keys/node
.vkey --out-file deleg.cert
67 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file $HOME/cold-keys/node.skey --s
igning-key-file stake.skey --mainnet --out-file tx.signed
68 cardano-cli shelley transaction sign --tx-body-file tx.raw --signing-key-file keys/payment.skey --signing-key-file keys/stake.skey --signing-key-fi
le pool-keys/cold.skey --signing-key-file keys_owner1/stake.skey --signing-key-file keys_owner2/stake.skey --mainnet --out-file tx.signed
69 cardano-cli shelley transaction sign --tx-body-file tx.raw --signing-key-file /payment.skey --signing-key-file /stake.skey --signing-key-file pool-
keys/cold.skey --signing-key-file keys_owner1/stake.skey --signing-key-file keys_owner2/stake.skey --mainnet --out-file tx.signed
70 cardano-cli shelley transaction sign
71 --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
72 cardano-cli shelley transaction sign
73 --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
74 cardano-cli shelley transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file stake.skey --signing-key-file cold.sk
ey --mainnet --out-file tx.signed
75 cardano-cli shelley transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file stake.skey --mainnet --out-file tx.si
gned
76 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file stake.skey --mainnet --out-file tx.signed
77 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file stake.skey --singing-key-file payment.vkey –
mainnet --out-file tx.signed
78 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --signing-key-file stake.skey --signing-key-file payment.vkey –
mainnet --out-file tx.signed
79 cardano-cli transaction sign --tx-body-file tx.raw --signing-key-file payment.skey --mainnet --out-file tx.signed
80 nano
81 history | more

There is no evidence here of you deleting the key.

The first command was rm -rf $NODE_HOME/cardano-wallet-shelley-2020.7.28 which removed that whole folder but I assume the key was not in there as you were executing commands after that.

I see you were referencing the key from multiple locations. I assume you were copy/pasting commands from tutorials.

Do a search on the filesystem for the key by executing the following command:

Search user folders:

find /home -type f -name payment.skey

Search whole system:

find / -type f -name payment.skey

Let us know if you find anything.

ok making progress found th skey that matched the pament.addr now im getting this error trying to send funds from my node to my wallet

cardano@ADAserver:~/cardano-my-node$ cardano-cli transaction submit
–tx-file tx.signed
–mainnet
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash “eb1c24e8bdfa4be0305c09c695cdb8526c470142d51544c8453cca03”]))))])
cardano@ADAserver:~/cardano-my-node$

So it was moved or you weren’t sure where it was located initially?

The error very much relates to a pool registration transaction but you said you trying to send funds.
Please send all commands you are executing which lead to that error.

it was moved

so i build the transaction to send 10 ada to my daedalus wallet

cardano@ADAserver:~/cardano-my-node$ currentSlot=$(cardano-cli query tip --mainnet | jq -r ‘.slot’)
echo Current Slot: $currentSlot
Current Slot: 40916113
cardano@ADAserver:~/cardano-my-node$ amountToSend=10000000
echo amountToSend: $amountToSend
amountToSend: 10000000
cardano@ADAserver:~/cardano-my-node$ destinationAddress=addr1qym56h9f9v2tflquvexds5n4qg8zhc56f2g6gmz9ny4ztyj52y8575vwvr3500a3ugnweu6qt7rt6twmz48sz57avmmskzwhfh
cardano@ADAserver:~/cardano-my-node$ echo destinationAddress: $destinationAddress
destinationAddress: addr1qym56h9f9v2tflquvexds5n4qg8zhc56f2g6gmz9ny4ztyj52y8575vwvr3500a3ugnweu6qt7rt6twmz48sz57avmmskzwhfh
cardano@ADAserver:~/cardano-my-node$ cardano-cli query utxo
–address $(cat payment.addr)
–mainnet > fullUtxo.out

tail -n +3 fullUtxo.out | sort -k3 -nr > balance.out

cat balance.out

tx_in=""
total_balance=0
while read -r utxo; do
in_addr=$(awk ‘{ print $1 }’ <<< “${utxo}”)
idx=$(awk ‘{ print $2 }’ <<< “${utxo}”)
utxo_balance=$(awk ‘{ print $3 }’ <<< “${utxo}”)
total_balance=$((${total_balance}+${utxo_balance}))
echo TxHash: ${in_addr}#${idx}
echo ADA: ${utxo_balance}
tx_in="${tx_in} --tx-in ${in_addr}#${idx}"
done < balance.out
txcnt=$(cat balance.out | wc -l)
echo Total ADA balance: ${total_balance}
echo Number of UTXOs: ${txcnt}
e42f1d0ce0219a91144ebc86bac1c05d05b4066d587adc31b75bae08cda5304d 0 502817955 lovelace + TxOutDatumHashNone
360f34c13440b0fb94d13abd87b67e8c586d14a8610fa7b1ca4f23a777807829 0 500000000 lovelace + TxOutDatumHashNone
TxHash: e42f1d0ce0219a91144ebc86bac1c05d05b4066d587adc31b75bae08cda5304d#0
ADA: 502817955
TxHash: 360f34c13440b0fb94d13abd87b67e8c586d14a8610fa7b1ca4f23a777807829#0
ADA: 500000000
Total ADA balance: 1002817955
Number of UTXOs: 2
cardano@ADAserver:~/cardano-my-node$ cardano-cli transaction build-raw
${tx_in}
–tx-out $(cat payment.addr)+0
–tx-out ${destinationAddress}+0
–invalid-hereafter $(( ${currentSlot} + 10000))
–fee 0
–out-file tx.tmp
cardano@ADAserver:~/cardano-my-node$ fee=$(cardano-cli transaction calculate-min-fee
–tx-body-file tx.tmp
–tx-in-count ${txcnt}
–tx-out-count 2
–mainnet
–witness-count 1
–byron-witness-count 0
–protocol-params-file params.json | awk ‘{ print $1 }’)
echo fee: $fee
fee: 179933
cardano@ADAserver:~/cardano-my-node$ txOut=$((${total_balance}-${fee}-${amountToSend}))
echo Change Output: ${txOut}
Change Output: 992638022
cardano@ADAserver:~/cardano-my-node$ cardano-cli transaction build-raw
${tx_in}
–tx-out $(cat payment.addr)+${txOut}
–tx-out ${destinationAddress}+${amountToSend}
–invalid-hereafter $(( ${currentSlot} + 10000))
–fee ${fee}
–out-file tx.raw

move tx.raw to my cold cpu and sign it with

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

moxe tx.signed back to my hot then send the transaction

cardano@ADAserver:~/cardano-my-node$ cardano-cli transaction submit
–tx-file tx.signed
–mainnet
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash “eb1c24e8bdfa4be0305c09c695cdb8526c470142d51544c8453cca03”]))))])
cardano@ADAserver:~/cardano-my-node$

Are you running 1.29.0 for both cardano-node and cardano-cli?
cardano-cli --version
cardano-node -version

Do you have the same cardano-cli binary on the cold machine?
On cold machine: cardano-cli --version

yes they are both

cardano-cli 1.29.0 - linux-x86_64 - ghc-8.10
git rev 4c59442958072657812c6c0bb8e0b4ab85ce1ba2

It’s very strange, the error is related to a pool register transaction but you are trying to send a simple transaction.

I have just one more shot: Are you absolutely sure that when you copy tx.raw to the cold machine that you are copying it to the correct place and you are using this file when signing the transaction, and not some old tx.raw file created before?

yes im coping it to my node folder and deleting the old ones

Sorry, I’m out of options :confused:

@amarbarace I had a similar issue and I solved it by making sure I specified the right retirementEpoch
in the command:

cardano-cli stake-pool deregistration-certificate  --cold-verification-key-file $HOME/cold-keys/node.vkey 
--epoch <retirementEpoch> --out-file pool.dereg

Here retirementEpoch should be the current epoch + 1 (if you want the pool to be retired earliest)

If the above is not the cause make sure you are signing the correct tx.raw and transferring the correct tx.signed to the hot environment. I created a folder called retire-pool that I used to make sure all the files I was transferring were the correct ones.

Hope this helps!

it looks like its a bad payment.vkey anyway to fix it if i have the payment.addr and the payment.skey?