Can't submit (allegedly) correct transaction

Ok, here we go.
First, the balance:

$ cardano-cli query utxo --address addr1vx9z6r6pv5g8aprprvjj2jhamsj4szr6j502fk7wkzq6a3sx0736n --mainnet
                           TxHash                                 TxIx        Amount
6adeb2bb5e294bcaf4b3aaf555b121e20cfb1c69631d2a8ba64c6b935201e9de     0        4579280 lovelace + TxOutDatumNone

checking that my vkey is the correct one:

$ cardano-cli address build --payment-verification-key-file payment.vkey --mainnet

building transaction:

$ txin=6adeb2bb5e294bcaf4b3aaf555b121e20cfb1c69631d2a8ba64c6b935201e9de
$ txix=0
$ utxo=4579280
cardano-cli transaction build-raw --tx-in "$txin#$txix" --tx-out "$(cat ../coldwallet.addr)+0" --invalid-hereafter 0 --fee 0 --out-file test.draft

Calculating fee, expiry & rebuilding transaction:

$ fee=( $(cardano-cli transaction calculate-min-fee --tx-body-file test.draft --tx-in-count 1 --tx-out-count 1 --witness-count 1 --byron-witness-count 0 --mainnet --protocol-params-file ../protocol.json) )
$ slot=$(( $(cardano-cli query tip --mainnet | jq '.slot')+3600 ))
$ cardano-cli transaction build-raw --tx-in "$txin#$txix" --tx-out "$(cat ../coldwallet.addr)+$(($utxo-$fee))" --invalid-hereafter $slot --fee ${fee[0]} --out-file test.draft

signing, checking and submitting it:

$ cardano-cli transaction sign --tx-body-file test.draft --signing-key-file payment.skey --mainnet --out-file signed.tx
$ cardano-cli transaction view --tx-file signed.tx
auxiliary scripts: null
certificates: null
collateral inputs: []
era: Alonzo
fee: 171045 Lovelace
- 6adeb2bb5e294bcaf4b3aaf555b121e20cfb1c69631d2a8ba64c6b935201e9de#0
metadata: null
mint: null
- address: [REDACTED]
  address era: Shelley
    lovelace: 4408235
  datum: null
  network: Mainnet
  payment credential:
    key hash: a63e72099726eddcb7b8022bbf11284ba4f6c1f022413b4e9725bd6e
  stake reference:
    key hash: 1e87128217ca8baadf5af504d50fb4f08e406aa979c62a75998e85c5
update proposal: null
validity range:
  lower bound: null
  upper bound: 71465269
withdrawals: null
$ cardano-cli transaction submit --tx-file signed.tx --mainnet
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash "8a2d0f4165107e84611b25254afddc2558087a951ea4dbceb081aec6"]))))])

I’ve tried everything within my knowledge to fix that, but i couldn’t.
I’ve tried to generate the vkey from my skey again, using:

$ cardano-cli key verification-key --signing-key-file key.skey --verification-key-file key.vkey

but it generates a different vkey, which gives me a different address.

Any ideas?

If the last command gives you a different verification key (which gives you a different address), it means the signing key is from that address, not from the address where the ADA is.


Yeah, that’s what i thought. I just have messed up my script somewhere. i guess those ada are gone now.
Let the markets know i just started burning ada LOL