I think the above script has no problem, but the last command puts following warning and doesn’t generate a witness file of the stake key.
Warning! A superfluous HW signing file specified (2 of 2), the witness was not created.
Warning! A superfluous output file specified (2 of 2), the file was not written to.
${STAKE_HWSFILE} and ${STAKE_VKEY} was created by following command.
The call for creating the stake witness puts warning messages and doesn’t create the witness file.
cardano-hw-cli transaction witness \
--tx-file ${TX_TRANSFORMED} \
--hw-signing-file ${STAKE_HWSFILE} \
—testnet-magic 2 \
--out-file ${STAKE_WITNESS} \
--derivation-type LEDGER
> Warning! A superfluous HW signing file specified (1 of 1), the witness was not created.
> Warning! A superfluous output file specified (1 of 1), the file was not written to.
What is ${INDEX}? The stake key should be 1852H/1815H/0H/2/0, not another index.
That could explain the superfluous HW signing file (and subsequently a missing signature from the real stake key).
Regarding Missing signing file for certificate: What is the content of the ${PAYMENT_HWSFILE} variable? Is it really the correct HW signing file?
Thank you for sharing the scripts.
I can’t run that immediately because of my environment setting.
As far as I checked, There is not much difference with my scripts.
I’ll check my scripts in detail based on the scripts you shared.
I went through this in more depth and opened tickets w/ VacuumLabs to fix the documentation. The “gist” is to sign the transaction with both hwsfile of stake and pyament. However, cardano-hw-cli will not produce two separate signature (--out-file) as the vacuumlabs documentation suggests when signing, it only produces one.
The step to assemble the transactions needs to not include a second, missing, signature which was not produced by cardano-hw-cli, and then it will assemble a final signed transaction, and this transaction can be submitted successfully.
This issue #163 was opened w/ vacuumlabs/cardano-hw-cli repository to address their documentation and what appears to be an incorrect, or at least quite strange, behavior of always warning something is superfluous when clearly it still necessary to produce a signature.
I hope others who ran into this issue find this helpful until the documentation is fixed and/or warnings removed or at least clarified.
@Trevor_Benson
Thank you for letting me know the details.
I understand why my scripts shown above doesn’t work. I’ve also tried to run a script which is modified to use single witness file, and then succesfully submited.
I’ll follow up the issue you’ve posted.