Hi @Alexd1985
Sorry to bother you again. I encountered a CLI TX error while following CoinCashew guide to secure the pledge with hw.
Before multisig, while building the transaction with this command on mary-era as the CoinCashew tutorial says:
cardano-cli transaction build-raw \
${tx_in} \
--mary-era \
--tx-out $(cat payment.addr)+${total_balance} \
--invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee 0 \
--certificate-file pool.cert \
--out-file tx.tmp
fee=$(cardano-cli transaction calculate-min-fee \
--tx-body-file tx.tmp \
--tx-in-count ${txcnt} \
--tx-out-count 1 \
--mainnet \
--witness-count 5 \
--byron-witness-count 0 \
--protocol-params-file params.json | awk '{ print $1 }')
echo fee: $fee
cardano-cli transaction build-raw \
${tx_in} \
--mary-era \
--tx-out $(cat payment.addr)+${txOut} \
--invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee ${fee} \
--certificate-file pool.cert \
--out-file tx-pool.raw
I get the following error with this build-raw command:
option --tx-out:
unexpected end of input
expecting white space, “+” or multi-asset value expression
Checked for odd spacing and I tried copying the exact command and just changing name of output certificate and it will not build the raw file.
I tried multisigning one certificate earlier and it did the build-raw correctly before, however when trying to sumbit, I entountered submitting error. Therefore, I tried to rebuild the certificate and now I encountered this build-raw error.
cardano-node 1.34.1
hw: 2x Trezor T (exporting keys and signing just fine)
The certificate uses witnesses: 2 hw, node, stake, payment. There is no problem exporting keys with Trezor T nor signing with them. I used this tutorial to learn how to enter additional signatures: GitHub - angelstakepool/add-hw-wallet-owner-to-pool: Add a hw-Wallet owner to a functioning pool; To secure pledge funds
A couple of months ago I had tested this method successfully on 1.32 so I find this error very strange.
Thank you
This time I had changed the certificate to use URL insead of IP:
--single-host-pool-relay https://relay1.domain.com \
--pool-relay-port 6000 \
I am not sure if that affects the cert build. Thanks again.
no, the certificate should not affect… do you have any assets on trezor? but you are not paying the transaction with trezor … weird
I removed all assets from both, as required, and am going to wait for 2 epoch turns after submitting the certificate to move pledge back in.
However, the problem is not with the hw or multisig. cardano-node 1.34.1 won’t let me build this:
cardano-cli transaction build-raw \
${tx_in} \
--mary-era \
--tx-out $(cat payment.addr)+${txOut} \
--invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee ${fee} \
--certificate-file pool.cert \
--out-file tx-pool.raw
parlange:
txOut
do you see anything here?
txOut=$((${total_balance}-${fee}))
echo txOut: ${txOut}
can u try
echo cardano-cli transaction build-raw \
${tx_in} \
--mary-era \
--tx-out $(cat payment.addr)+${txOut} \
--invalid-hereafter $(( ${currentSlot} + 10000)) \
--fee ${fee} \
--certificate-file pool.cert \
--out-file tx-pool.raw
what is the output?
The output of build-raw is now correct.
However, while trying to submit with:
cardano-cli transaction submit \
--tx-file tx-pool.multisign \
--mainnet
I get the following error:
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationE rror ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (InvalidW itnessesUTXOW
I added more ADA for a total balance of 12, tried again from scratch and still did not submit.
Thank you @Alexd1985
try to use the right KES when u sign the transaction
The block producer has the right KES (kes.skey), it is active and I tried submitting from that cardano-node 1.34.1
BP, desktop and air-gapped are all on 1.34.1
Thanks
no, I wanted to say that the above error is generated because u are using a wrong KEY to sign the transaction (wallet keys)
1 Like
I did this to witness:
cardano-cli transaction witness \
--tx-body-file tx-pool.raw \
--signing-key-file node.skey \
--mainnet \
--out-file node.witness
cardano-cli transaction witness \
--tx-body-file tx-pool.raw \
--signing-key-file stake.skey \
--mainnet \
--out-file stake.witness
cardano-cli transaction witness \
--tx-body-file tx-pool.raw \
--signing-key-file payment.skey \
--mainnet \
--out-file payment.witness
on Desktop
cardano-hw-cli transaction witness \
--tx-body-file tx-pool.raw \
--hw-signing-file hw-stake1.hwsfile \
--mainnet \
--out-file hw-stake1.witness
cardano-hw-cli transaction witness \
--tx-body-file tx-pool.raw \
--hw-signing-file hw-stake2.hwsfile \
--mainnet \
--out-file hw-stake2.witness
Then, assembled on air-gapped with:
cardano-cli transaction assemble \
--tx-body-file tx-pool.raw \
--witness-file node.witness \
--witness-file stake.witness \
--witness-file payment.witness \
--witness-file hw-stake1.witness \
--witness-file hw-stake2.witness \
--out-file tx-pool.multisign
Then the error while submitting on bp:
cardano-cli transaction submit \
--tx-file tx-pool.multisign \
--mainnet
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationE rror ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (InvalidW itnessesUTXOW
This, using a previous value of 5 witness_count while calculating min-fee after creating cert, building tx.tmp:
witness_count = 5
fee=$(cardano-cli transaction calculate-min-fee \
--tx-body-file tx.tmp \
--tx-in-count ${txcnt} \
--tx-out-count 1 \
--mainnet \
--witness-count 5 \
--byron-witness-count 0 \
--protocol-params-file params.json | awk '{ print $1 }')
echo fee: $fee
I was mixing up certificates from previous attempts.
Started from scratch and finally Transaction was successfully submitted.
Thank you very much for helping me debug this @Alexd1985
1 Like
Hi Parlange,
In retrospect, the error messages that appeared seem to have been useful for resolving specific issues related to the transaction:
option --tx-out ...
– An issue is identified with the value of the tx-out option specified in the transaction.
Command failed: ... InvalidWitnessesUTXOW
– An issue is identified with the witnesses (secret keys and key files) signing the transaction.
They mostly are. But it is well hidden in Haskell’s mountains of parantheses.